CN117675255A - Resource access method, related device, equipment and storage medium - Google Patents

Resource access method, related device, equipment and storage medium Download PDF

Info

Publication number
CN117675255A
CN117675255A CN202211064507.4A CN202211064507A CN117675255A CN 117675255 A CN117675255 A CN 117675255A CN 202211064507 A CN202211064507 A CN 202211064507A CN 117675255 A CN117675255 A CN 117675255A
Authority
CN
China
Prior art keywords
information
access
request
resource
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211064507.4A
Other languages
Chinese (zh)
Inventor
蔡鹏�
曾凯明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211064507.4A priority Critical patent/CN117675255A/en
Publication of CN117675255A publication Critical patent/CN117675255A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a resource access method which can be applied to a cloud server and relates to scenes including but not limited to cloud technology, artificial intelligence, intelligent traffic, auxiliary driving and the like. The method comprises the following steps: responding to a first access request, and if a target login mode is started, acquiring first access information of a first access party, wherein the first access information is pre-stored in information of a server, or the first access information is information carried by terminal equipment in a first small text file cookie and transmitted to the server; generating a first resource request according to the first access request and the first access information; responding to a first resource request, and acquiring a first target resource associated with first domain name information; and sending the first target resource to the terminal equipment. The application also provides an apparatus, a device and a storage medium. According to the method and the device, for an access party, resources corresponding to corresponding authorities can be accessed without entering a login environment, so that the resource access efficiency is improved.

Description

Resource access method, related device, equipment and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a method, a related device, an apparatus, and a storage medium for resource access.
Background
With the rapid development of information technology, cloud technology has been widely applied to various fields of society. And virtualizing the computing resources of the hardware based on the cloud technology to form a huge virtual resource pool, and providing the huge virtual resource pool for users in a dynamic telescopic arrangement mode. The user can access the virtual resource pool through the network according to the self requirement so as to obtain the required cloud resources.
Currently, a user needs to log into a cloud system (e.g., a public cloud system, a private cloud system, or a hybrid cloud system) before accessing cloud resources. The manner of logging into the cloud system includes, but is not limited to, using a user name and password, or using a short message authentication code, or using a multi-factor authentication (MFA) token.
However, the inventor finds that at least the following problems exist in the existing scheme, no matter what mode of logging in the cloud system is adopted, a certain time is required to perform corresponding operation, so that the mode of logging in the cloud system is complicated, and the resource access efficiency is reduced. In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a method, a related device, equipment and a storage medium for resource access. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
In view of this, the present application provides, in one aspect, a method for resource access, including:
receiving a first access request sent by terminal equipment, wherein the first access request carries first domain name information;
responding to a first access request, and if a target login mode is started, acquiring first access information of a first access party, wherein the first access information is information stored in a server in advance, or the first access information is information carried by terminal equipment in a first small text file cookie and transmitted to the server;
generating a first resource request according to the first access request and the first access information;
responding to a first resource request, and acquiring a first target resource associated with first domain name information;
and sending the first target resource to the terminal equipment.
Another aspect of the present application provides a method for accessing a resource, including:
responding to domain name input operation, sending a first access request to a server so that the server obtains a first target resource associated with first domain name information according to a first resource request under the condition that a target login mode is started, wherein the first access request carries the first domain name information, the first resource request is information which is generated according to the first access request and the first access information and is stored in the server in advance, or the first access information is information which is carried by terminal equipment in a first small text file cookie and is transmitted to the server;
Receiving a first target resource sent by a server;
and rendering and displaying the first target resource.
Another aspect of the present application provides a resource access device, including:
the receiving module is used for receiving a first access request sent by the terminal equipment, wherein the first access request carries first domain name information;
the acquisition module is used for responding to the first access request, and acquiring first access information of a first access party if a target login mode is started, wherein the first access information is information stored in a server in advance, or the first access information is information carried by terminal equipment in a first small text file cookie and transmitted to the server;
the generation module is used for generating a first resource request according to the first access request and the first access information;
the acquisition module is also used for responding to the first resource request and acquiring a first target resource associated with the first domain name information;
and the sending module is used for sending the first target resource to the terminal equipment.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the resource access device further includes a determination module;
the determining module is used for determining an opened target login mode after receiving a first access request sent by the terminal equipment, if the first access request also carries target field information, wherein the target field information and the first domain name information are used for forming target domain name information;
The determining module is further configured to determine that the target login mode is not started if the first access request does not carry the target field information after receiving the first access request sent by the terminal device;
or alternatively, the first and second heat exchangers may be,
the determining module is further configured to determine that the target login mode is started if the value corresponding to the login mode variable is the first variable value after receiving the first access request sent by the terminal device;
and the determining module is also used for determining that the target login mode is not started if the value corresponding to the login mode variable is the second variable value after receiving the first access request sent by the terminal equipment.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the determining module is further configured to determine that the target login mode is started after receiving the first access request sent by the terminal device, if the first access request further carries target field information, and the value corresponding to the login mode variable is a first variable value;
the determining module is further configured to determine that the target login mode is not started after receiving the first access request sent by the terminal device, if the first access request further carries target field information, and the value corresponding to the login mode variable is a second variable value;
The determining module is further configured to determine that the target login mode is started if the first access request does not carry the target field information after the first access request sent by the terminal device is received, and the value corresponding to the login mode variable is a first variable value;
and the determining module is further configured to determine that the target login mode is not started after receiving the first access request sent by the terminal device, if the first access request does not carry the target field information, and the value corresponding to the login mode variable is the second variable value.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the acquisition module is specifically configured to acquire first access information from a server, where the first access information includes identity information and key information of a first access party.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the acquisition module is specifically configured to receive a first cookie sent by the terminal device, where the first cookie carries first access information, and the first access information includes identity information and key information of a first access party;
the first access information is obtained from the first cookie.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the receiving module is further configured to receive a second access request sent by the terminal device after sending the first target resource to the terminal device, where the second access request carries second domain name information;
the receiving module is further configured to, in response to the second access request, receive a second cookie sent by the terminal device if the target login mode is started, where the second cookie carries first access information, and the first access information includes identity information and key information of a first access party;
the generation module is further used for generating a second resource request according to the second access request and the first access information;
the acquisition module is also used for responding to a second resource request and acquiring a second target resource associated with second domain name information;
and the sending module is also used for sending the second target resource to the terminal equipment.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the receiving module is further configured to, after sending the first target resource to the terminal device, if the terminal device responds to the access switching request, receive a third cookie sent by the terminal device in the case that the target login mode is started, where the third cookie carries second access information, and the second access information includes identity information and key information of a second access party;
The generation module is further used for generating a third resource request according to the first access request and the second access information;
the acquisition module is further used for responding to a third resource request and acquiring a third target resource associated with the first domain name information;
and the sending module is also used for sending the third target resource to the terminal equipment.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the generation module is specifically configured to generate an interface call request according to the first access request, where the interface call request is used for requesting to call an application programming interface API;
generating a first resource request according to the interface call request and the first access information;
the acquisition module is specifically configured to call an API to acquire a first target resource associated with the first domain name information.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the generating module is specifically used for packaging the interface call request and the first access information to obtain a first resource request;
the acquisition module is specifically used for calling an API to analyze the first resource request to obtain first access information to be verified, wherein the first access information to be verified comprises identity information to be verified and key information to be verified;
If the identity information to be verified is consistent with the pre-stored identity information, the key information to be verified is consistent with the pre-stored key information, and the identity information to be verified is successfully matched with the key information to be verified, a first target resource associated with the first domain name information is acquired.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the generation module is specifically used for acquiring key information of a first access party from the first access information;
encrypting the interface call request by adopting the key information of the first access party to obtain an encrypted interface call request;
packaging the encrypted interface call request and the identity information of the first access party to obtain a first resource request;
the acquisition module is specifically used for calling the API to analyze the first resource request to obtain an encrypted interface calling request and identity information of a first access party;
calling an API, and acquiring key information of a first access party according to the identity information of the first access party;
and if the encrypted interface call request is successfully decrypted by using the key information of the first access party, acquiring a first target resource associated with the first domain name information.
Another aspect of the present application provides a resource access device, including:
The sending module is used for responding to the domain name input operation, sending a first access request to the server so that the server obtains a first target resource associated with first domain name information according to a first resource request under the condition that a target login mode is started, wherein the first access request carries the first domain name information, the first resource request is generated according to the first access request and the first access information, and the first access information is information stored in the server in advance, or the first access information is information carried by the terminal equipment in a first small text file cookie and transmitted to the server;
the receiving module is used for receiving the first target resource sent by the server;
and the display module is used for rendering and displaying the first target resource.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the sending module is further configured to send a second access request to the server in response to the domain name input operation, so that the server obtains a second target resource associated with second domain name information according to the second resource request under the condition that the target login mode is started, where the second access request carries the second domain name information, the second resource request is generated according to the second access request and the first access information, and the first access information is information carried by the terminal device in a second cookie and transmitted to the server;
The receiving module is also used for receiving the second target resource sent by the server;
and the display module is also used for rendering and displaying the second target resource.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the display module is further used for responding to the selection operation of the information viewing control, displaying account information and a switching control corresponding to the account information, wherein the account information is bound with second access information, and the second access information comprises identity information and key information of a second access party;
the sending module is further configured to send a third cookie to the server in response to the selection operation for the switching control, so that the server obtains a third target resource associated with the first domain name information according to a third resource request under the condition that the target login mode is started, wherein the third cookie carries second access information, and the third resource request is generated according to the first access request and the second access information;
the receiving module is also used for receiving the third target resource sent by the server;
and the display module is also used for rendering and displaying the third target resource.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the resource access device further includes a processing module;
The display module is also used for responding to the information adding operation and displaying an information input area;
and the processing module is used for responding to the input operation aiming at the information input area and storing the account information, the identity information and the key information of the access party in the local storage.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
and the processing module is also used for deleting the account information, the identity information and the key information of the access party from the local storage of the browser in response to the information deleting operation.
Another aspect of the present application provides a computer device comprising a memory storing a computer program and a processor implementing the methods of the above aspects when the processor executes the computer program.
Another aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the methods of the above aspects.
In another aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the methods of the above aspects.
From the above technical solutions, the embodiments of the present application have the following advantages:
In the embodiment of the application, a method for accessing resources is provided, a server responds to a first access request sent by a terminal device, and if a target login mode is started, first access information of a first access party is obtained. The first access information may be information stored in the server in advance or transmitted by the terminal device through a cookie. Based on the first access request and the first access information, the server generates a first resource request, and obtains a first target resource associated with the first domain name information according to the first resource request. Thereby, the server sends the first target resource to the terminal device. In the above manner, in the case of opening the target login mode, the server may locally acquire the access information of the user, or the server may receive the access information sent by the terminal device through the cookie. Wherein, the cookie can store the access information of the last access party. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
Drawings
FIG. 1 is a schematic view of an implementation environment of a resource access method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of another environment for implementing a resource access method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a resource access method in an embodiment of the present application;
FIG. 4 is a schematic diagram of an interaction flow based on a target login mode in an embodiment of the present application;
FIG. 5 is another flow chart of a resource access method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a resource access page according to an embodiment of the present application;
FIG. 7 is another schematic diagram of a resource access page according to an embodiment of the present application;
FIG. 8 is another schematic diagram of a resource access page in an embodiment of the present application;
FIG. 9 is another schematic diagram of a resource access page in an embodiment of the present application;
FIG. 10 is a schematic diagram of a resource access device according to an embodiment of the present application;
FIG. 11 is another schematic diagram of a resource access device according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a server according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a terminal device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method, a related device, equipment and a storage medium for resource access. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
As technology advances, more and more cloud service providers offer users cloud computing services with different functions. Rights management may be performed for users accessing resources or functions of the respective systems for different cloud service providers. It will be appreciated that cloud computing (cloud computing) is a computing model that distributes computing tasks across a large pool of computer-made resources, enabling various application systems to acquire computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed. Cloud computing can be divided into public cloud, private cloud and hybrid cloud according to a deployment mode, and a user can access resources under corresponding rights through a public cloud platform, a private cloud platform or a hybrid cloud platform. Public cloud, private cloud and hybrid cloud will be described below, respectively.
A private cloud (private cloud) is created by creating a cloud infrastructure and software and hardware resources within a firewall for each department within an organization or enterprise to share resources within a data center. A private cloud is created, typically with infrastructure as a service (infrastructure as a service, iaaS) software for the cloud device in addition to hardware resources. Private cloud computing also includes three levels of cloud hardware, cloud platform, cloud services. In contrast, cloud hardware is a user's own personal computer or server, rather than a data center of a cloud computing vendor. Cloud computing manufacturers build data centers to provide public cloud services for millions of users, thus requiring tens of millions of servers. Private cloud computing serves only friends and relatives to individuals and clients and suppliers to businesses, so personal or business's own personal computers or servers are sufficient to provide cloud services.
Public clouds (public clouds) generally refer to clouds that can be used by third party providers for users, public clouds are generally available through the internet and may be free or low cost, and the core attribute of public clouds is shared resource services. There are many examples of such clouds that can provide services throughout the open public network today.
Hybrid clouds (hybrid clouds) merge public clouds and private clouds, and are the main mode and development direction of cloud computing in recent years. Private clouds are mainly for enterprise users, and for safety reasons, enterprises prefer to store data in the private clouds, but at the same time wish to obtain computing resources of public clouds, in which case hybrid clouds are increasingly adopted, and mix and match the public clouds and the private clouds to obtain the best effect.
Currently, users are required to log into a cloud platform to be able to access resources in the system. And if the specified time is exceeded after login, the user can automatically log out of the login, and the user name, the password and other information need to be input again when logging in next time. Especially for development environments, users often need to access multiple different versions of resources, each with a separate set of login credentials, which makes the user's operation of switching back and forth between the multiple versions cumbersome.
Based on the above, the application provides a resource access method for solving the problem of low resource access efficiency. That is, a user may access resources in the cloud system without logging in. For a developer, a user name and a password are not required to be maintained when different versions of resources are accessed, so that development efficiency is improved to a great extent.
The method provided by the present application may be applied to the implementation environment shown in fig. 1 and the implementation environment shown in fig. 2, referring to fig. 1, where the implementation environment includes a terminal device 110 and a server 130, and the terminal device 110 and the server 130 are connected through a communication network 120. Referring to fig. 2, the implementation environment includes a terminal device 110, a local server 140 and a cloud server 150, where the terminal device 110 and the local server 140 are connected through a communication network 120, and the local server 140 and the cloud server 150 are connected through the communication network 120.
The communication network 120 to which the present application relates uses standard communication techniques and/or protocols, typically the Internet, but can be any network including, but not limited to, bluetooth, local area network (local area network, LAN), metropolitan area network (metropolitan area network, MAN), wide area network (wide area network, WAN), mobile, private network, or any combination of virtual private networks. In some embodiments, custom or dedicated data communication techniques may be used in place of or in addition to the data communication techniques described above.
The terminal device 110 related to the present application includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, an aircraft, and the like. The client is deployed on the terminal device 110, and the client may run on the terminal device 110 in a browser mode, or may run on the terminal device 110 in an independent APP mode, or the like.
The server 130 according to the present application may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (content delivery network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Server 130 in the present application may specifically relate to local server 140 and cloud server 150. The local server 140 is a hardware device for providing computing services, and its components include, but are not limited to, a processor, hard disk, memory, system bus, etc. Because the local server 140 needs to respond to the service request and process it, the local server 140 should generally have the ability to take on and secure the service. Cloud server 150 is a computing server, typically a cluster of servers, for providing resiliency. The cloud server 150 is calculated at the cloud, which can reduce the cost of development and operation. The cloud server adopts distributed storage, so that real-time multiple copy disaster recovery can be realized, single-point faults are avoided, multiple faults can be effectively avoided, elastic expansion and contraction of storage resources are supported, and the cloud server has functions of thermomigration and the like.
In connection with the implementation environment shown in fig. 1, terminal device 110 sends an access request to server 130 via communication network 120, where the access request carries domain name information. If the target login mode has been started, the server 130 may acquire the access information and generate a resource request for invoking the resource based on the access information, whereby the server 130 transmits the target resource to the terminal device 110 through the communication network 120 based on the resource request to locally invoke the target resource under the corresponding authority from the server 130.
In connection with the implementation environment shown in fig. 2, terminal device 110 sends an access request to local server 140 via communication network 120, where the access request carries domain name information. If the target login mode has been turned on, the local server 140 may obtain the access information and generate a resource request for invoking the resource based on the access information. Thus, the local server 140 transmits a resource request to the cloud server 150 through the communication network 120, and the cloud server 150 invokes a target resource under the corresponding authority based on the resource request and then feeds back to the local server 140 through the communication network 120. The target resource is sent by the local server 140 to the terminal device 110 via the communication network 120.
With reference to the foregoing description, the method for accessing resources in the present application will be described below in terms of a server, and referring to fig. 3, the method for accessing resources in the embodiment of the present application may be independently completed by the server, may be independently completed by a terminal device, or may be completed by cooperation between the terminal device and the server, where the present application includes:
210. receiving a first access request sent by terminal equipment, wherein the first access request carries first domain name information;
in one or more embodiments, a user triggers a first access request through a browser provided by a terminal device, whereby a server (e.g., a local server) receives the first access request sent by the terminal device through a scripting language running environment (node. Js) layer. The first access request carries first domain name information, and the first domain name information can be specifically main domain name information.
220. Responding to a first access request, and if a target login mode is started, acquiring first access information of a first access party, wherein the first access information is information stored in a server in advance, or the first access information is information carried by terminal equipment in a first small text file cookie and transmitted to the server;
In one or more embodiments, a server (e.g., a local server) may directly obtain first access information of a first access party in response to a first access request in the event that a target login mode (i.e., a password-free login mode) is initiated. Wherein the first access information includes identity information (secretID) and key information (secretKey) of a first access party, each access party having a unique pair of secretID and secretKey.
Illustratively, in one case, the access information (i.e., the first access information) used when the access request was last triggered is obtained in a local store (localtorage) of the browser. This access information (i.e., the first access information) is then added to the first small text file (cookie) upon request and sent to the node. Js layer. Illustratively, in another case, if the server does not receive the access information sent by the terminal device, or the system supports access to the resource using default access information, the server may extract the access information (i.e., the first access information) directly from the local.
230. Generating a first resource request according to the first access request and the first access information;
in one or more embodiments, a server (e.g., a local server) may determine resources associated with the first domain name information based on the first domain name information carried in the first access request. Thus, the server generates a first resource request in combination with the addresses where the resources are located and the first access information. The first resource request may specifically be a hypertext transfer protocol (hyper text transfer protocol, HTTP) request or a hypertext transfer security protocol (hyper text transfer protocol over secure socket layer, HTTPs) request.
Specifically, taking HTTP requests as an example, the first access information (i.e., the secretID and secretKey of the first party) and the request payload (payload) are combined into a query parameter in the request. The query parameter is then used as a requestor of the first resource request and is sent to the application programming interface (application programming interface, API) in a form (form) submission. The API may specifically be a Cloud API (CAPI).
240. Responding to a first resource request, and acquiring a first target resource associated with first domain name information;
in one or more embodiments, a server, in response to a first resource request, invokes a resource (i.e., a first target resource) corresponding to first access information based on a resource address carried in the first resource request.
Specifically, taking a cloud server (cloud virtual machine, CVM) resource as an example, the local server sends a first resource request to the cloud server, and the cloud server invokes a corresponding resource (i.e., a first target resource) based on a resource address carried in the first resource request, and then sends the first target resource to the local server through an API (e.g., CAPI). The first target resource is a resource associated with the first domain name information, for example, if the first domain name information needs to load the resource a and the resource B, the first resource request may carry the call address of the resource a and the call address of the resource B.
250. And sending the first target resource to the terminal equipment.
In one or more embodiments, a server (e.g., a local server) sends a first target resource to a terminal device, whereby the terminal device can render and expose the first target resource through a browser.
In an embodiment of the present application, a method for accessing resources is provided. By the method, under the condition that the target login mode is started, the server can acquire access information of the user locally, or the server receives the access information sent by the terminal equipment through the cookie, and the cookie can store the access information of the last access party. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in this embodiment of the present application may further include, after receiving the first access request sent by the terminal device:
if the first access request also carries target field information, determining an opened target login mode, wherein the target field information and the first domain name information are used for forming target domain name information;
If the first access request does not carry the target field information, determining that the target login mode is not started
Or alternatively, the first and second heat exchangers may be,
after receiving the first access request sent by the terminal device, the method may further include:
if the variable value corresponding to the login mode variable is a first variable value, determining that a target login mode is started;
and if the variable value corresponding to the login mode variable is the second variable value, determining that the target login mode is not started.
In one or more embodiments, a manner of controlling a password-free login mode switch is presented. As can be seen from the foregoing embodiments, the server needs to determine whether the target login mode is started, and execute the corresponding operation when the target login mode is started. If the target login mode is not started, the user is required to input a user name and a password on a login interface for login. Two ways of determining whether to turn on the target login mode will be described below, specifically:
mode one, based on specified domain name information;
the first access request is a request containing first domain name information, and if the target login mode needs to be triggered, the first access request also needs to contain target field information. That is, the target field information and the first domain name information together constitute target domain name information, and thus, a user can input specified domain name information (i.e., target domain name information) in a browser provided by the terminal device to directly access resources under the corresponding authority.
Illustratively, assume that the target domain name information is "standby zone. Xxx. Com", i.e., the target domain name information may be expressed as "standby zone.$ { main domain name information }). Where "standby" is the target field information and "xxx.com" is the first domain name information. Based on this, if the first access request also carries target field information, i.e., the first access request is a request generated based on target domain name information, it is indicated that the target login mode is turned on. If the first access request does not carry the target field information, i.e. the first access request is a request generated based on the first domain name information, it is indicated that the target login mode is not activated.
It should be noted that the target field information may also be set to other field information, which is not limited herein. The target field information may precede the main domain name information, or the target field information may follow the main domain name information, the above examples are presented by way of example in which the target field information may precede the main domain name information, but should not be construed as limiting the present application.
Mode two, based on the back-end variable;
the node. Js layer based on the server can judge whether to start the target login mode or not through the login mode variable. Taking the login mode variable as "isByPwd" as an example, if "isbypwd=true", it indicates that the variable value corresponding to the login mode variable is a first variable value, where "true" is the first variable value, and thus, indicates that the target login mode is turned on. If "isbypwd=false", it indicates that the variable value corresponding to the login mode variable is the second variable value, where "false" is the second variable value, and thus indicates that the target login mode is not started.
It can be appreciated that in the case of turning on the target login mode, the login state check is skipped directly. At the same time, the turn-on identification of the target login mode may be rendered to the browser by an embedded scripting language (embedded javascript, ejs) template engine. The browser can display the corresponding interface element through the opening identification.
In the embodiment of the application, a mode for controlling the password-free login mode switch is provided. Through the mode, under one condition, the password-free login mode can be directly started through the specified domain name information, namely, resources in the system can be directly accessed through the specific domain name information, and tedious operations caused by login are avoided. In another case, the password-free login mode can be started through the back-end variable, namely, related personnel can control whether to start the password-free login mode according to actual requirements, so that feasibility and flexibility of a scheme are improved.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in this embodiment of the present application may further include, after receiving the first access request sent by the terminal device:
if the first access request also carries target field information and the variable value corresponding to the login mode variable is a first variable value, determining that a target login mode is started;
If the first access request also carries target field information and the variable value corresponding to the login mode variable is a second variable value, determining that the target login mode is not started;
if the first access request does not carry the target field information and the variable value corresponding to the login mode variable is the first variable value, determining that the target login mode is started;
if the first access request does not carry the target field information and the variable value corresponding to the login mode variable is the second variable value, determining that the target login mode is not started.
In one or more embodiments, another way of controlling a password-free login mode switch is presented. As can be seen from the foregoing embodiments, whether to turn on the target login mode can be determined based on the specified domain name information or the backend variable. In practical applications, the priority of controlling the login mode based on the back-end variable is higher than the priority of controlling the login mode based on the specified domain name information.
Illustratively, it is assumed that the first access request also carries target field information, i.e., the first access request is a request generated based on the target domain name information. Meanwhile, it is assumed that a variable value corresponding to the login mode variable is a first variable value. Based on this, the login mode variable is prioritized, thereby determining the opened target login mode.
Illustratively, it is assumed that the first access request also carries target field information, i.e., the first access request is a request generated based on the target domain name information. Meanwhile, it is assumed that the variable value corresponding to the login mode variable is the second variable value. Based on this, the login mode variable is prioritized, and thus it is determined that the target login mode is not turned on.
Illustratively, it is assumed that the first access request does not carry the target field information, i.e., the first access request is a request generated based on the first domain name information. Meanwhile, it is assumed that a variable value corresponding to the login mode variable is a first variable value. Based on this, the login mode variable is prioritized, thereby determining the opened target login mode.
Illustratively, it is assumed that the first access request does not carry the target field information, i.e., the first access request is a request generated based on the first domain name information. Meanwhile, it is assumed that the variable value corresponding to the login mode variable is the second variable value. Based on this, the login mode variable is prioritized, and thus it is determined that the target login mode is not turned on.
Next, in the embodiment of the present application, another way of controlling the password-free login mode switch is provided. By the mode, whether the password-free login mode is started or not is determined based on the back-end variable control preferentially, so that related personnel have higher control authority, whether the password-free login mode is started or not can be controlled according to actual requirements, and feasibility and flexibility of a scheme are improved.
Optionally, on the basis of the foregoing respective embodiments corresponding to fig. 3, in another optional embodiment provided in the present application, the obtaining first access information of the first access party may specifically include:
and acquiring first access information from the server, wherein the first access information comprises the identity information and the key information of the first access party.
In one or more embodiments, a manner of resource access using generic access information is presented. According to the embodiment, in the scene of accessing the system resource, a set of access information can be configured at the server side, so that a scheme of avoiding secret login can be realized by one-time configuration.
Specifically, the relevant person may configure one common access information, taking this access information as the first access information as an example, based on which all users accessing the system use the same set of access information. Therefore, when the node. Js layer of the server does not receive the access information sent by the browser through the cookie, the configured default access information can be directly used as the first access information.
Secondly, in the embodiment of the application, a way of using general access information to access resources is provided. By the mode, one piece of access information can be preset as default access information. Based on this, different visitors can access the same resource without logging into the system. Thereby improving the access efficiency of the system resources.
Optionally, on the basis of the foregoing respective embodiments corresponding to fig. 3, in another optional embodiment provided in the present application, the obtaining first access information of the first access party may specifically include:
receiving a first cookie sent by a terminal device, wherein the first cookie carries first access information, and the first access information comprises identity information and key information of a first access party;
the first access information is obtained from the first cookie.
In one or more embodiments, a manner of resource access using private access information is presented. As can be seen from the foregoing embodiments, in the scenario of accessing the system resource, the user may set an account information first, and use the account information to obtain a set of access information (i.e., secretID and secretKey) bound to the account information after registering in the system. Meanwhile, different access information can set corresponding access rights, and different access rights can access different system resources.
Specifically, for ease of understanding, referring to table 1, table 1 is a schematic representation of a correspondence between account information and access information.
TABLE 1
Account information secretID secretKey
Zhang San WEQz8krbsJ5yKBZp848SA GFkf29xGARNpq86cd98joQ
Li Si 941Hjf9398rndvNG93mav4 799538AJcd98jDA272jewOE
Assuming that the user "Zhang Sano" is the first visitor, based on Table 1, the first visitor uses the first visitor information including "WEQz8krbsJ5yKBZp848SA" and "GFkf29xGARNpq86cd98joQ". Based on this, assuming that the server receives a cookie carrying the first access information (i.e., the first cookie) through the node. Js layer, the node. Js layer may extract the first access information from the first cookie. Thus, the first party may be provided with its corresponding target resource.
Secondly, in the embodiment of the application, a way of using private access information to access resources is provided. By the above mode, different users pre-configure access information used by the users. Based on this, different visitors can access different resources without logging into the system. Not only improves the access efficiency of the system resources, but also can set different access rights for different users, thereby achieving the flexibility of resource access.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in this embodiment of the present application may further include, after sending the first target resource to the terminal device:
receiving a second access request sent by the terminal equipment, wherein the second access request carries second domain name information;
responding to a second access request, and if a target login mode is started, receiving a second cookie sent by the terminal equipment, wherein the second cookie carries first access information, and the first access information comprises identity information and key information of a first access party;
generating a second resource request according to the second access request and the first access information;
responding to a second resource request, and acquiring a second target resource associated with second domain name information;
And sending the second target resource to the terminal equipment.
In one or more embodiments, a manner of switching access in different version environments is presented. As can be seen from the foregoing embodiments, particularly for development environments, an accessing party often needs to access resources corresponding to multiple different version environments, each with a separate set of login credentials. Based on the method, the visitor can achieve the purpose of rapidly switching the version environment by triggering the access request.
Specifically, assume that the last time the user (e.g., the first visitor) triggered the access request (i.e., the first access request) used the first access information, and that the browser sent the first access information to the node. Js layer of the server through the first cookie. Based on this, the user may further continue to trigger a second access request through the browser with the identity of the first visitor, the second access request carrying second domain name information, which may specifically be the primary domain name information. Since the first access information is used when the user triggers the first access request, the browser may add the first access information to the second cookie with the request and send it to the node. Js layer of the server (e.g., the local server). Wherein the first access information includes a secretID and a secretKey of the first access party. The server (e.g., a local server) may determine resources associated with the second domain name information based on the second domain name information carried in the second access request. Thus, the server generates a second resource request in combination with the addresses where the resources are located and the first access information. The server (e.g., cloud server) invokes a resource corresponding to the first access information (i.e., a second target resource) based on a resource address carried in the second resource request in response to the second resource request. Based on this, the server (e.g., a local server) sends the acquired second target resource to the terminal device. Thus, the terminal device can render and display the second target resource through the browser.
It should be noted that if the node. Js layer of the server (e.g., the local server) does not receive the access information sent by the browser, or the system supports access to the resource using the default access information, the server may directly extract the access information (i.e., the first access information) from the local.
Secondly, in the embodiment of the application, a manner of switching access in environments with different versions is provided. By the method, the same visitor can also perform password-free login in different version environments. Therefore, the method and the device can be well applied to development environments, so that the efficiency of user switching between version environments is improved.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in this embodiment of the present application may further include, after sending the first target resource to the terminal device:
if the terminal equipment responds to the access switching request, receiving a third cookie sent by the terminal equipment under the condition that a target login mode is started, wherein the third cookie carries second access information, and the second access information comprises identity information and key information of a second access party;
generating a third resource request according to the first access request and the second access information;
Responding to a third resource request, and acquiring a third target resource associated with the first domain name information;
and sending the third target resource to the terminal equipment.
In one or more embodiments, a manner of switching access to different system resources is presented. As can be seen from the foregoing embodiments, particularly for development environments, the accessing parties often having different identities need resources corresponding to the same version environment, and each accessing party has a set of independent login credentials. Based on the method, different access parties can achieve the purpose of quickly accessing the identity by triggering the access request.
Specifically, assuming that the user wants to switch to the identity of the second access party to access the resource corresponding to the first domain name information, the user can trigger an access switching request through a browser provided by the terminal device. The access switching request carries second access information, and the second access information comprises a secretID and a secretKey of a second access party. Since the second access information is used when the user triggers the access switch request, the browser adds the second access information to the third cookie with the request and sends it to the node. Js layer of the server (e.g., the local server). The server (e.g., a local server) may determine resources associated with the first domain name information based on the first domain name information carried in the first access request. Thus, the server generates a third resource request in combination with the addresses where the resources are located and the access switch request. The server (e.g., cloud server) calls, in response to the third resource request, a resource corresponding to the second access information (i.e., a third target resource) based on the resource address carried in the third resource request. Based on this, the server (e.g., a local server) sends the obtained third target resource to the terminal device. Thus, the terminal device can render and display the third target resource through the browser.
Secondly, in the embodiment of the application, a manner of switching different system resources to access is provided. By the method, different visitors can perform password-free login in the same environment. Therefore, the method and the device can be well suitable for scenes of accessing resources by a plurality of different access parties, and therefore efficiency of switching access identities of users is improved.
Optionally, on the basis of the foregoing respective embodiments corresponding to fig. 3, in another optional embodiment provided in this embodiment of the present application, generating the first resource request according to the first access request and the first access information may specifically include:
generating an interface call request according to the first access request, wherein the interface call request is used for requesting to call an Application Programming Interface (API);
generating a first resource request according to the interface call request and the first access information;
the obtaining the first target resource associated with the first domain name information may specifically include:
the call API obtains a first target resource associated with the first domain name information.
In one or more embodiments, a manner of invoking a target resource based on a resource request is presented. As can be seen from the foregoing embodiments, taking the first domain name information carried in the first access request as an example, the server (e.g., the local server) is based on the resources associated with the first domain name information. Where these resources typically need to be invoked via an interface call request. The interface call request may be an API request or a cloud API request, not limited herein. Two ways of generating the first resource request will be described below.
The first mode is to automatically rewrite domain name information;
specifically, assuming that the first domain name information is "xxx.com", the target domain name information is "standby. Here, "standby" is target field information. Assume again that the domain name information corresponding to resource a is "xxx.com/111". Based on this, when the target login mode is started, the domain name information corresponding to the resource a is automatically changed to "standby one. Xxx.com/111", that is, "standby one. Xxx.com/111" is used as an interface call request for calling the resource a.
The second mode does not need to rewrite domain name information;
specifically, the first domain name information is assumed to be "xxx.com", and the domain name information corresponding to resource a is assumed to be "xxx.com/111". Based on this, if the started target login mode is determined by the first variable value corresponding to the login mode variable, it is not necessary to rewrite domain name information corresponding to the resource a. That is, "xxx.com/111" is directly taken as an interface call request to call resource a.
Thus, the server (e.g., a local server) encapsulates the interface call request and the first access information as a first resource request and accesses a corresponding first target resource (e.g., resource a) based on the first resource request. It is understood that the first resource request may be an HTTP request or an HTTPs request, which is not limited herein.
Secondly, in the embodiment of the application, a way of calling the target resource based on the resource request is provided. By the method, before the resource request is generated, the interface call requests can be automatically rewritten, so that each interface call request meets the condition of no-secret access, and feasibility and operability of the scheme are ensured.
Optionally, on the basis of the foregoing respective embodiments corresponding to fig. 3, in another optional embodiment provided in this embodiment of the present application, generating the first resource request according to the interface call request and the first access information may specifically include:
packaging the interface call request and the first access information to obtain a first resource request;
the calling API obtains a first target resource associated with the first domain name information, which specifically may include:
calling an API to analyze the first resource request to obtain first access information to be verified, wherein the first access information to be verified comprises identity information to be verified and key information to be verified;
if the identity information to be verified is consistent with the pre-stored identity information, the key information to be verified is consistent with the pre-stored key information, and the identity information to be verified is successfully matched with the key information to be verified, a first target resource associated with the first domain name information is acquired.
In one or more embodiments, a manner of validating access information based on an API is presented. As can be seen from the foregoing embodiments, taking the first domain name information carried in the first access request as an example, after the server obtains the interface call request (for example, the API request or the cloud API request), the server may encapsulate the interface call request and the first access information to obtain the first resource request (for example, the HTTP request or the cloud HTTPs request). And the server calls an API or cloud API to analyze the first resource request, so that first access information to be verified is obtained through analysis. If the first resource request is not tampered with, the first access information should be carried. Therefore, the server needs to verify the access information obtained by the parsing.
Specifically, the first access information to be verified includes identity information to be verified and key information to be verified. Based on the above, the server can judge whether the identity information to be verified is consistent with the pre-stored identity information, if so, the identity information to be verified is not tampered. Similarly, the server may determine whether the key information to be verified is consistent with the pre-stored key information, and if so, indicate that the key information to be verified has not been tampered with. In addition, the server also needs to judge whether the identity information to be verified and the key information to be verified are the same group of access information, if so, the server indicates that the identity information to be verified and the key information to be verified are successfully matched. Thus, the server determines that the first resource request is not intercepted or tampered with, and thus, a resource corresponding to the first access information (i.e., a first target resource) may be invoked based on the first domain name information.
Again, in the embodiments of the present application, a way to validate access information based on APIs is provided. Through the mode, the server calls the API to verify the received access information, namely, the consistency and accuracy of the key information and the identity information, so that the information is prevented from being intercepted or tampered in the transmission process, and the safety and reliability of resource access are improved.
Optionally, on the basis of the foregoing respective embodiments corresponding to fig. 3, in another optional embodiment provided in this embodiment of the present application, generating the first resource request according to the interface call request and the first access information may specifically include:
acquiring key information of a first access party from the first access information;
encrypting the interface call request by adopting the key information of the first access party to obtain an encrypted interface call request;
packaging the encrypted interface call request and the identity information of the first access party to obtain a first resource request;
the call API obtains a first target resource associated with the first domain name information, which may include,
the calling API analyzes the first resource request to obtain an encrypted interface calling request and identity information of a first access party;
Calling an API, and acquiring key information of a first access party according to the identity information of the first access party;
and if the encrypted interface call request is successfully decrypted by using the key information of the first access party, acquiring a first target resource associated with the first domain name information.
In one or more embodiments, another way of validating access information based on an API is presented. As can be seen from the foregoing embodiments, taking the first domain name information carried in the first access request as an example, after the server obtains the interface call request (for example, the API request or the cloud API request), the server encrypts the interface call request by using the secretKey in the first domain name information, so as to obtain the encrypted interface call request. The encrypted interface call request and the secretID of the first party are then encapsulated to obtain a first resource request (e.g., an HTTP request or a cloud HTTPs request). The server call API or cloud API parses the first resource request, thereby parsing the encrypted interface call request and the secretID of the first visitor.
Specifically, the server stores the mapping relationship between the secretID and the secretKey locally, and thus, the server can find the secretKey of the first access party through the secretID of the first access party. Based on this, the server may decrypt the encrypted interface call request using the secretKey of the first access party, and if the decryption is successful, the server may call a resource corresponding to the first access information (i.e., the first target resource) based on the first domain name information.
Again, in the embodiments of the present application, another way of verifying access information based on APIs is provided. By the method, the server calls the API to verify the received access information, namely, the consistency and accuracy of the key information and the identity information, and provides corresponding resources under the condition that the information is successfully decrypted, so that the information is prevented from being intercepted or tampered in the transmission process, and the safety and reliability of resource access are further improved.
In connection with the above embodiment, fig. 4 will be described below, where fig. 4 is a schematic diagram of an interaction flow based on a target login mode in the embodiment of the present application, and as shown in the drawing, taking accessing a cloud resource in a private cloud as an example, specifically:
in step S1, the user may send an access request through the browser, where the access request may carry the target domain name information.
In step S2, the access request reaches the node. Js layer of the server, and the node. Js layer can determine whether to start the target login mode according to the login mode variable and the target field information. If the target login mode is started, login state verification is skipped, and at the same time, the 'isbypwd=true' can be rendered under a window (window) through a ejs template engine. If the target login mode is not started, the login page is jumped to.
In step S3, the node layer calls a series of interfaces at the back end to obtain access information and account information of the current login user, and after data aggregation, the data are mounted under the window through a ejs template engine. And loads the static resources required by the micro front end in the ejs template engine. The hypertext markup language (hyper text markup language, HTML) is returned to the browser.
In step S4, the browser renders the page after receiving the HTML, and loads the micro front end resource at the same time.
In step S5, after loading the micro front-end resource, the value of the login mode variable (i.e. "isByPwd") put in step S2 is fetched from the window during page initialization. If the first variable value is a first variable value, loading a password-free script language software development kit (JavaScript software development kit, js-sdk) resource, and thereby rendering a bound user interface.
In step S6, js-sdk resources are loaded, and then the information viewing control of the page is rendered, wherein the information viewing control can be represented as a suspension button displaying the account information corresponding to the current visitor. That is, whenever the information view control is displayed, it indicates that the target login mode has been turned on.
In step S7, an API function set (XmlHttpRequest) is intercepted at the total gateway of the HTTP request. Rewriting all request domain names sent to cloud API into target domain name information containing target field information
In step S8, when the cloud API request is sent in the service, the cloud API request domain name having the target login mode started is changed to the target domain name information including the target field information, because there is a previous operation of rewriting the domain name information. The rewritten cloud API requests also reach the node.
In step S9, when the cloud API request is sent, the browser takes the secretID and secretKey of the current visitor from the localtorage), turns over the cookie with the request, and then transmits the cookie to the node.
After the request reaches the node. Js layer, the secretID and secretKey are retrieved from the cookie in the node. Js layer in step S10. If the cookie does not carry the secretID and secretKey, then the default secretID and default secretKey are used for configuration.
In step S11, secretID, secretKey and the request payload are combined into a request query. And then, taking the request query as a request body of HTTP, and sending the request query to the cloud API in a form submitting mode.
In step S12, the target resource is returned through the cloud API, and the target resource is processed and then displayed on the browser at the front end.
With reference to the foregoing description, the method for accessing resources in the present application will be described below in terms of a terminal device, and referring to fig. 5, the method for accessing resources in the embodiment of the present application may be independently completed by the terminal device, may be independently completed by a server, or may be completed by cooperation between the terminal device and the server, where the present application includes:
310. Responding to domain name input operation, sending a first access request to a server so that the server obtains first target resources associated with first domain name information according to a first resource request under the condition that a target login mode is started, wherein the first access request carries the first domain name information, the first resource request is information which is generated according to the first access request and the first access information and is stored in the server in advance, or the first access information is information which is carried in a first cookie by terminal equipment and is transmitted to the server;
in one or more embodiments, the user may input domain name information through a browser provided by the terminal device, thereby triggering a first access request, where the first access request carries first domain name information, and the domain name information may specifically be primary domain name information. The server (e.g., a local server) receives the first access request sent by the terminal device through the node. In the case of opening the target login mode (i.e., the password-free login mode), the first access information of the first access party may be directly acquired. Wherein the first access information includes a secretID and a secretKey of the first access party.
It should be noted that, the manner in which the server obtains the first access information is described in the foregoing embodiments, so that details are not described here.
Specifically, the server (e.g., a local server) may determine, based on the first domain name information carried in the first access request, a resource associated with the first domain name information. Thus, the server generates a first resource request in combination with the addresses where the resources are located and the first access information. The server (e.g., cloud server) responds to the first resource request, calls a resource corresponding to the first access information (i.e., a first target resource) based on a resource address carried in the first resource request, and then sends the first target resource to the server (e.g., local server) through an API (e.g., CAPI).
320. Receiving a first target resource sent by a server;
in one or more embodiments, a terminal device receives a first target resource associated with first domain name information sent by a server (e.g., a local server).
330. And rendering and displaying the first target resource.
In one or more embodiments, the terminal device renders and displays the first target resource on a corresponding browser interface.
In an embodiment of the present application, a method for accessing resources is provided. By the method, under the condition that the target login mode is started, the server can acquire access information of the user locally, or the server receives the access information sent by the terminal equipment through the cookie, and the cookie can store the access information of the last access party. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in the embodiment of the present application may further include:
responding to domain name input operation, sending a second access request to the server so that the server obtains a second target resource associated with second domain name information according to the second resource request under the condition that a target login mode is started, wherein the second access request carries the second domain name information, the second resource request is generated according to the second access request and the first access information, and the first access information is information carried by the terminal equipment in a second cookie and transmitted to the server;
Receiving a second target resource sent by a server;
and rendering and displaying the second target resource.
In one or more embodiments, a manner is presented by which to support user switching access in different version environments. As can be seen from the foregoing embodiments, the user may input domain name information through a browser provided by the terminal device, thereby triggering an access request. It should be noted that, the manner of triggering the first access request is similar to the manner of triggering the second access request, and the manner of triggering the second access request by the user will be described below with reference to the drawings.
Specifically, for ease of understanding, referring to fig. 6, fig. 6 is a schematic diagram of a resource access page in the embodiment of the present application, and as shown in the drawing, A1 is used to indicate account information used by a current user, for example, "Zhang san". A2 is used to indicate a domain name information input area. For example, if the target login mode is controlled based on the login mode variable, the user may input second domain name information, i.e., "xxxxx. For example, if the target login mode is controlled based on the target field information, the user may input the second domain name information as well as the target field information, i.e., "standby one. Xxxx. Com.
And taking the account information indicated by the A1 as the account information of the first access party, wherein the account information of the first access party has a binding relation with the first access information. Taking table 1 as an example, that is, account information "Zhang Sano" corresponds to first access information composed of a secretID and a secretKey. When the first access party inputs the second domain name information in the domain name information input area, or when the first access party inputs the second domain name information and the target field information in the domain name information input area, a second access request is transmitted to the server through the browser. The server generates a second resource request according to the second domain name information and the first access information carried in the second access request, and then acquires a second target resource associated with the second domain name information according to the second resource request. Thus, the terminal equipment receives the second target resource sent by the server, and renders and displays the second target resource.
In one case, the first access information may be added to the second cookie with the request, and sent to the node. In another case, if the user does not switch the identity of the accessing party, the server may directly use the last used access information (e.g., the first access information).
Secondly, in the embodiment of the application, a manner of supporting the user to switch access in different version environments is provided. By the method, the same visitor can also perform password-free login in different version environments. Therefore, the method and the device can be well applied to development environments, so that the efficiency of user switching between version environments is improved.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in the embodiment of the present application may further include:
responding to the selection operation aiming at the information viewing control, and displaying account information and a switching control corresponding to the account information, wherein the account information is bound with second access information, and the second access information comprises identity information and key information of a second access party;
responding to the selection operation aiming at the switching control, sending a third cookie to the server so that the server obtains a third target resource associated with the first domain name information according to a third resource request under the condition that a target login mode is started, wherein the third cookie carries second access information, and the third resource request is generated according to the first access request and the second access information;
Receiving a third target resource sent by a server;
and rendering and displaying the third target resource.
In one or more embodiments, a manner is presented by which to support a user to switch between accessing different system resources. From the foregoing embodiments, the user may also switch different identities to access the resource.
Specifically, for ease of understanding, referring to fig. 7, fig. 7 is another schematic diagram of a resource access page in the embodiment of the present application, and as shown in fig. 7 (a), B1 is used to indicate an information viewing control, where the information viewing control may be represented as a hover button displaying account information corresponding to a current access party. When the user triggers a selection operation for the information viewing control indicated by B1, an interface as shown in fig. 7 (B) is displayed. Wherein B2 is used to indicate a list of users, it will be appreciated that if the user does not bind access information, an empty list of users is displayed. B3 is used to indicate account information, for example, "litu". And B4 is used for indicating a switching control corresponding to the account information, for example, switching to a switching control with account information of 'Lifour'. The account information is bound with second access information, and the second access information comprises identity information and key information of a second access party. Taking table 1 as an example, that is, account information "litu" corresponds to the second access information composed of the secretID and the secretKey.
And when the user clicks the switching control indicated by the B4, sending an access switching request to the server through the browser, and sending a third cookie carrying the second access information to the server. Thus, the server generates a third resource request according to the first access request and the second access information, and then obtains a third target resource associated with the first domain name information according to the third resource request. In this way, the terminal device receives the third target resource sent by the server, and renders and displays the third target resource.
It should be noted that, after clicking the switch control, the user refreshes the whole page and accesses the environment with the updated identity of the accessing party.
Secondly, in the embodiment of the application, a manner of supporting the user to switch different system resources for access is provided. By the method, different visitors can perform password-free login in the same environment. Therefore, the method and the device can be well suitable for scenes of accessing resources by a plurality of different access parties, and therefore efficiency of switching access identities of users is improved.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in the embodiment of the present application may further include:
Displaying an information entry area in response to an information adding operation;
and responding to the input operation aiming at the information input area, and saving the account information, the identity information and the key information of the access party in a local storage.
In one or more embodiments, a way to actively add visitor-related information is presented. As can be seen from the foregoing embodiments, the user may also add information corresponding to the accessing party, including but not limited to account information, secretID, and secretKey.
Specifically, for ease of understanding, referring to fig. 8, fig. 8 is another schematic diagram of a resource access page in the embodiment of the present application, where, as shown in fig. 8 (a), C1 is used to indicate an add control, and when a user clicks the add control indicated by C1, an information adding operation is triggered. Thus, an interface shown in fig. 8 (B) is displayed. C2 is used to indicate an information entry area in which a user may enter account information, identity information, and key information of an accessing party. And C3 is used for indicating a determination control, and when the user clicks the determination control after finishing inputting, the account information, the secretID and the secretKey can be stored in a localtorage of the browser, and the bound user list is refreshed. And C4 is used for indicating a cancel control, and when the user clicks the cancel control, the interface for inputting information is exited.
Secondly, in the embodiment of the application, a way of actively adding the related information of the access party is provided. By the method, the user can add account information, identity information, key information and other contents to the user list according to actual demands, so that the user can directly select corresponding identities from the user list for access, and the flexibility of information processing is realized.
Optionally, on the basis of the respective embodiments corresponding to fig. 3, another optional embodiment provided in the embodiment of the present application may further include:
and deleting account information, identity information and key information of the access party from the local storage of the browser in response to the information deleting operation.
In one or more embodiments, a way to actively delete visitor-related information is presented. As can be seen from the foregoing embodiments, the user may also delete the information corresponding to the accessing party, including but not limited to account information, secretID, and secretKey.
Specifically, for ease of understanding, referring to fig. 9, fig. 9 is another schematic diagram of a resource access page in the embodiment of the present application, where as shown in fig. 9 (a), D1 is used to indicate a deletion control, and when a user clicks the deletion control indicated by D1, an information deletion operation is triggered. For example, the user clicks the delete control corresponding to the account information "li" and thereby displays the interface shown in fig. 9 (B). It can be seen that the account information is deleted from the localtorage of the browser as the secretID and secretKey corresponding to "litu".
Secondly, in the embodiment of the present application, a way to actively delete the related information of the accessing party is provided. By the method, the user can delete the account information, the identity information, the key information and other contents displayed in the user list according to the actual demands, so that the influence of useless information on interface display is avoided, and the flexibility of information processing is realized.
Referring to fig. 10, fig. 10 is a schematic diagram of an embodiment of a resource access device in an embodiment of the present application, where the resource access device 40 includes:
a receiving module 410, configured to receive a first access request sent by a terminal device, where the first access request carries first domain name information;
the obtaining module 420 is configured to obtain, in response to the first access request, first access information of the first access party if the target login mode is started, where the first access information is information stored in the server in advance, or the first access information is information that the terminal device carries a cookie in the first small text file and is transmitted to the server;
a generating module 430, configured to generate a first resource request according to the first access request and the first access information;
The obtaining module 420 is further configured to obtain a first target resource associated with the first domain name information in response to the first resource request;
a sending module 440, configured to send the first target resource to the terminal device.
In an embodiment of the present application, a resource access device is provided. By adopting the device, under the condition of starting the target login mode, the server can locally acquire the access information of the user, or the server receives the access information sent by the terminal equipment through the cookie, and the cookie can store the access information of the last access party. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
Optionally, in another embodiment of the resource access device 40 provided in the embodiment of the present application, on the basis of the embodiment corresponding to fig. 10, the resource access device 40 further includes a determining module 450;
a determining module 450, configured to determine, after receiving a first access request sent by a terminal device, that a target login mode has been started if the first access request further carries target field information, where the target field information and the first domain name information are used to form target domain name information;
The determining module 450 is further configured to determine that the target login mode is not started if the first access request does not carry the target field information after receiving the first access request sent by the terminal device;
or alternatively, the first and second heat exchangers may be,
the determining module 450 is further configured to determine that the target login mode is started if the value corresponding to the login mode variable is the first variable value after receiving the first access request sent by the terminal device;
the determining module 450 is further configured to determine that the target login mode is not started if the value corresponding to the login mode variable is the second variable value after receiving the first access request sent by the terminal device.
In an embodiment of the present application, a resource access device is provided. By adopting the device, under one condition, the password-free login mode can be directly started by specifying the domain name information, namely, resources in the system can be directly accessed by the specific domain name information, and tedious operation caused by login is avoided. In another case, the password-free login mode can be started through the back-end variable, namely, related personnel can control whether to start the password-free login mode according to actual requirements, so that feasibility and flexibility of a scheme are improved.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
The determining module 450 is further configured to determine that the target login mode is started after receiving the first access request sent by the terminal device, if the first access request further carries target field information, and the value corresponding to the login mode variable is a first variable value;
the determining module 450 is further configured to determine that the target login mode is not started after receiving the first access request sent by the terminal device, if the first access request further carries target field information, and the value corresponding to the login mode variable is a second variable value;
the determining module 450 is further configured to determine that the target login mode is started after receiving the first access request sent by the terminal device, if the first access request does not carry the target field information, and the value corresponding to the login mode variable is the first variable value;
the determining module 450 is further configured to determine that the target login mode is not started after receiving the first access request sent by the terminal device, if the first access request does not carry the target field information, and the value corresponding to the login mode variable is the second variable value.
In an embodiment of the present application, a resource access device is provided. By adopting the device, whether the password-free login mode is started or not is determined based on back-end variable control preferentially, so that related personnel have higher control authority, whether the password-free login mode is started or not can be controlled according to actual requirements, and feasibility and flexibility of a scheme are improved.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the obtaining module 420 is specifically configured to obtain first access information from a server, where the first access information includes identity information and key information of a first access party.
In an embodiment of the present application, a resource access device is provided. By adopting the device, one piece of access information can be preset as default access information. Based on this, different visitors can access the same resource without logging into the system. Thereby improving the access efficiency of the system resources.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the obtaining module 420 is specifically configured to receive a first cookie sent by the terminal device, where the first cookie carries first access information, and the first access information includes identity information and key information of a first access party;
the first access information is obtained from the first cookie.
In an embodiment of the present application, a resource access device is provided. By adopting the device, different users pre-configure access information used by the device. Based on this, different visitors can access different resources without logging into the system. Not only improves the access efficiency of the system resources, but also can set different access rights for different users, thereby achieving the flexibility of resource access.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the receiving module 410 is further configured to receive a second access request sent by the terminal device after sending the first target resource to the terminal device, where the second access request carries second domain name information;
the receiving module 410 is further configured to, in response to the second access request, receive a second cookie sent by the terminal device if the target login mode is started, where the second cookie carries first access information, and the first access information includes identity information and key information of a first access party;
the generating module 430 is further configured to generate a second resource request according to the second access request and the first access information;
the obtaining module 420 is further configured to obtain a second target resource associated with the second domain name information in response to the second resource request;
the sending module 440 is further configured to send the second target resource to the terminal device.
In an embodiment of the present application, a resource access device is provided. By adopting the device, the same visitor can also carry out password-free login in different version environments. Therefore, the method and the device can be well applied to development environments, so that the efficiency of user switching between version environments is improved.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the receiving module 410 is further configured to, after sending the first target resource to the terminal device, if the terminal device responds to the access switching request, receive a third cookie sent by the terminal device in a case that the target login mode is started, where the third cookie carries second access information, and the second access information includes identity information and key information of a second access party;
the generating module 430 is further configured to generate a third resource request according to the first access request and the second access information;
the obtaining module 420 is further configured to obtain a third target resource associated with the first domain name information in response to the third resource request;
the sending module 440 is further configured to send the third target resource to the terminal device.
In an embodiment of the present application, a resource access device is provided. By adopting the device, different visitors can perform password-free login in the same environment. Therefore, the method and the device can be well suitable for scenes of accessing resources by a plurality of different access parties, and therefore efficiency of switching access identities of users is improved.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the generating module 430 is specifically configured to generate an interface call request according to the first access request, where the interface call request is used to request to call an API;
generating a first resource request according to the interface call request and the first access information;
the obtaining module 420 is specifically configured to call an API to obtain a first target resource associated with the first domain name information.
In an embodiment of the present application, a resource access device is provided. By adopting the device, before the resource request is generated, the interface call request can be automatically rewritten, so that each interface call request meets the condition of no-secret access, and the feasibility and operability of the scheme are ensured.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the generating module 430 is specifically configured to encapsulate the interface call request and the first access information, so as to obtain a first resource request;
the obtaining module 420 is specifically configured to call an API to analyze the first resource request, so as to obtain first access information to be verified, where the first access information to be verified includes identity information to be verified and key information to be verified;
If the identity information to be verified is consistent with the pre-stored identity information, the key information to be verified is consistent with the pre-stored key information, and the identity information to be verified is successfully matched with the key information to be verified, a first target resource associated with the first domain name information is acquired.
In an embodiment of the present application, a resource access device is provided. By adopting the device, the server calls the API to verify the received access information, namely, the consistency and accuracy of the key information and the identity information, so that the information is prevented from being intercepted or tampered in the transmission process, and the safety and reliability of resource access are improved.
Alternatively, on the basis of the embodiment corresponding to fig. 10, in another embodiment of the resource access device 40 provided in the embodiment of the present application,
the generating module 430 is specifically configured to obtain key information of the first access party from the first access information;
encrypting the interface call request by adopting the key information of the first access party to obtain an encrypted interface call request;
packaging the encrypted interface call request and the identity information of the first access party to obtain a first resource request;
the obtaining module 420 is specifically configured to call an API to parse the first resource request, so as to obtain an encrypted interface call request and identity information of the first access party;
Calling an API, and acquiring key information of a first access party according to the identity information of the first access party;
and if the encrypted interface call request is successfully decrypted by using the key information of the first access party, acquiring a first target resource associated with the first domain name information.
In an embodiment of the present application, a resource access device is provided. By adopting the device, the server calls the API to verify the consistency and accuracy of the received access information, namely, the key information and the identity information, and provides corresponding resources under the condition that the information is successfully decrypted, so that the information is prevented from being intercepted or tampered in the transmission process, and the safety and reliability of resource access are further improved.
Referring to fig. 11, fig. 11 is a schematic diagram of an embodiment of a resource access device in an embodiment of the present application, where the resource access device 50 includes:
a sending module 510, configured to send a first access request to the server in response to a domain name input operation, so that the server obtains, according to a first resource request, a first target resource associated with first domain name information under a condition that a target login mode is started, where the first access request carries first domain name information, the first resource request is generated according to the first access request and the first access information, and the first access information is information stored in the server in advance, or the first access information is information that the terminal device carries a cookie in a first small text file and transmits the cookie to the server;
A receiving module 520, configured to receive a first target resource sent by a server;
and a display module 530, configured to render and display the first target resource.
In an embodiment of the present application, a resource access device is provided. By adopting the device, under the condition of starting the target login mode, the server can locally acquire the access information of the user, or the server receives the access information sent by the terminal equipment through the cookie, and the cookie can store the access information of the last access party. Therefore, for the access party, the resource corresponding to the corresponding authority can be accessed without entering a login environment, so that the resource access efficiency is improved.
Alternatively, in another embodiment of the resource access device 50 provided in the embodiment of the present application based on the embodiment corresponding to fig. 11,
the sending module 510 is further configured to send a second access request to the server in response to the domain name input operation, so that the server obtains, according to the second resource request, a second target resource associated with the second domain name information when the target login mode is started, where the second access request carries the second domain name information, the second resource request is generated according to the second access request and the first access information, and the first access information is information carried by the terminal device in a second cookie and transmitted to the server;
The receiving module 520 is further configured to receive a second target resource sent by the server;
the display module 530 is further configured to render and display the second target resource.
In an embodiment of the present application, a resource access device is provided. By adopting the device, the same visitor can also carry out password-free login in different version environments. Therefore, the method and the device can be well applied to development environments, so that the efficiency of user switching between version environments is improved.
Alternatively, in another embodiment of the resource access device 50 provided in the embodiment of the present application based on the embodiment corresponding to fig. 11,
the display module 530 is further configured to display account information and a switching control corresponding to the account information in response to a selection operation for the information viewing control, where the account information is bound to second access information, and the second access information includes identity information and key information of a second access party;
the sending module 510 is further configured to send a third cookie to the server in response to the selection operation for the switching control, so that the server obtains a third target resource associated with the first domain name information according to a third resource request under the condition that the target login mode is started, where the third cookie carries second access information, and the third resource request is generated according to the first access request and the second access information;
The receiving module 520 is further configured to receive a third target resource sent by the server;
the display module 530 is further configured to render and display the third target resource.
In an embodiment of the present application, a resource access device is provided. By adopting the device, different visitors can perform password-free login in the same environment. Therefore, the method and the device can be well suitable for scenes of accessing resources by a plurality of different access parties, and therefore efficiency of switching access identities of users is improved.
Optionally, in another embodiment of the resource access device 50 provided in the embodiment of the present application, based on the embodiment corresponding to fig. 11, the resource access device 50 further includes a processing module 540;
a display module 530 for displaying an information entry area in response to an information adding operation;
and a processing module 540, configured to store account information, identity information, and key information of the visitor in a local storage in response to an input operation for the information entry area.
In an embodiment of the present application, a resource access device is provided. By adopting the device, the user can add account information, identity information, key information and other contents to the user list according to actual demands, so that the user can directly select corresponding identities from the user list for access, and the flexibility of information processing is realized.
Alternatively, in another embodiment of the resource access device 50 provided in the embodiment of the present application based on the embodiment corresponding to fig. 11,
the processing module 540 is further configured to delete account information, identity information, and key information of the accessing party from the local storage of the browser in response to the information deletion operation.
In an embodiment of the present application, a resource access device is provided. By adopting the device, a user can delete account information, identity information, key information and other contents displayed in the user list according to actual demands, so that the influence of useless information on interface display is avoided, and the flexibility of information processing is realized.
Fig. 12 is a schematic diagram of a server structure provided in an embodiment of the present application, where the server 600 may vary considerably in configuration or performance, and may include one or more central processing units (central processing units, CPU) 622 (e.g., one or more processors) and memory 632, one or more storage media 630 (e.g., one or more mass storage devices) storing applications 642 or data 644. Wherein memory 632 and storage medium 630 may be transitory or persistent storage. The program stored on the storage medium 630 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, the central processor 622 may be configured to communicate with a storage medium 630 and execute a series of instruction operations in the storage medium 630 on the server 600.
The Server 600 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input/output interfaces 658, and/or one or more operating systems 641, such as Windows Server TM ,Mac OS X TM ,UnixTM,Linux TM ,FreeBSD TM Etc.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 12.
The embodiment of the present application further provides a terminal device, as shown in fig. 13, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the method portion of the embodiment of the present application. In the embodiment of the present application, a terminal device is taken as a personal computer as an example for explanation:
fig. 13 is a block diagram showing a part of the structure of a personal computer related to a terminal device provided in an embodiment of the present application. Referring to fig. 13, the personal computer includes: radio Frequency (RF) circuitry 710, memory 720, input unit 730, display unit 740, sensor 750, audio circuitry 760, wireless fidelity (wireless fidelity, wiFi) module 770, processor 780, and power supply 790. Those skilled in the art will appreciate that the personal computer configuration shown in fig. 13 is not limiting and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes each constituent element of the personal computer in detail with reference to fig. 13:
the RF circuit 710 may be configured to receive and transmit signals during a message or a call, and specifically, receive downlink information of a base station and process the downlink information with the processor 780; in addition, the data of the design uplink is sent to the base station. Typically, the RF circuitry 710 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (low noise amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 710 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (global system of mobile communication, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), long term evolution (long term evolution, LTE), email, short message service (short messaging service, SMS), and the like.
The memory 720 may be used to store software programs and modules, and the processor 780 performs various functional applications and data processing of the personal computer by running the software programs and modules stored in the memory 720. The memory 720 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of a personal computer (such as audio data, phonebook, etc.), and the like. In addition, memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 730 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the personal computer. In particular, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on or thereabout the touch panel 731 using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 731 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 780, and can receive commands from the processor 780 and execute them. In addition, the touch panel 731 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 730 may include other input devices 732 in addition to the touch panel 731. In particular, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a mouse, joystick, etc.
The display unit 740 may be used to display information input by a user or information provided to the user and various menus of a personal computer. The display unit 740 may include a display panel 741, and alternatively, the display panel 741 may be configured in the form of a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 731 may cover the display panel 741, and when the touch panel 731 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 780 to determine the type of touch event, and then the processor 780 provides a corresponding visual output on the display panel 741 according to the type of touch event. Although in fig. 13, the touch panel 731 and the display panel 741 are two separate components to implement the input and output functions of the personal computer, in some embodiments, the touch panel 731 and the display panel 741 may be integrated to implement the input and output functions of the personal computer.
The personal computer may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 741 and/or the backlight when the personal computer moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), can detect the gravity and the direction when stationary, and can be used for recognizing the gesture of a personal computer (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with a personal computer are not described in detail herein.
Audio circuitry 760, speaker 761, and microphone 762 may provide an audio interface between a user and a personal computer. The audio circuit 760 may transmit the received electrical signal converted from audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 to be output; on the other hand, microphone 762 converts the collected sound signals into electrical signals, which are received by audio circuit 760 and converted into audio data, which are processed by audio data output processor 780 for transmission to, for example, another personal computer via RF circuit 710, or for output to memory 720 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a personal computer can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 770, so that wireless broadband Internet access is provided for the user. Although fig. 13 shows the WiFi module 770, it is understood that it does not belong to the essential constitution of the personal computer, and can be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 780 is a control center of the personal computer, connects various parts of the entire personal computer using various interfaces and lines, and performs various functions of the personal computer and processes data by running or executing software programs and/or modules stored in the memory 720, and calling data stored in the memory 720. Optionally, the processor 780 may include one or more processing units; alternatively, the processor 780 may integrate an application processor that primarily processes operating systems, user interfaces, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 780.
The personal computer also includes a power supply 790 (e.g., a battery) for powering the various components, optionally in logical communication with the processor 780 through a power management system, such as for performing charge, discharge, and power management functions by the power management system. Although not shown, the personal computer may further include a camera, a bluetooth module, etc., which will not be described herein.
The steps performed by the terminal device in the above-described embodiments may be based on the terminal device structure shown in fig. 13.
The embodiment of the application also provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the steps of the method described in the previous embodiments.
Also provided in embodiments of the present application is a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the methods described in the foregoing embodiments.
Embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the methods described in the foregoing embodiments.
It will be appreciated that in the specific embodiments of the present application, related data such as access information is referred to, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a server or a terminal device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media in which computer programs can be stored.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (20)

1. A method of resource access, comprising:
receiving a first access request sent by terminal equipment, wherein the first access request carries first domain name information;
responding to the first access request, and if a target login mode is started, acquiring first access information of a first access party, wherein the first access information is information stored in a server in advance, or the first access information is information carried by the terminal equipment in a first small text file cookie and transmitted to the server;
generating a first resource request according to the first access request and the first access information;
Responding to the first resource request, and acquiring a first target resource associated with the first domain name information;
and sending the first target resource to the terminal equipment.
2. The method according to claim 1, wherein after the receiving the first access request sent by the terminal device, the method further comprises:
if the first access request also carries target field information, determining that the target login mode is started, wherein the target field information and the first domain name information are used for forming target domain name information;
if the first access request does not carry the target field information, determining that the target login mode is not started;
or alternatively, the first and second heat exchangers may be,
after receiving the first access request sent by the terminal device, the method further includes:
if the variable value corresponding to the login mode variable is a first variable value, determining that the target login mode is started;
and if the variable value corresponding to the login mode variable is a second variable value, determining that the target login mode is not started.
3. The method according to claim 1, wherein after the receiving the first access request sent by the terminal device, the method further comprises:
If the first access request also carries target field information and the value corresponding to the login mode variable is a first variable value, determining that the target login mode is started;
if the first access request also carries the target field information and the value corresponding to the login mode variable is a second variable value, determining that the target login mode is not started;
if the first access request does not carry the target field information and the variable value corresponding to the login mode variable is the first variable value, determining that the target login mode is started;
and if the first access request does not carry the target field information and the variable value corresponding to the login mode variable is the second variable value, determining that the target login mode is not started.
4. The method of claim 1, wherein the obtaining the first access information of the first party comprises:
and acquiring the first access information from the server, wherein the first access information comprises the identity information and the key information of the first access party.
5. The method of claim 1, wherein the obtaining the first access information of the first party comprises:
Receiving a first cookie sent by the terminal equipment, wherein the first cookie carries the first access information, and the first access information comprises identity information and key information of a first access party;
the first access information is obtained from the first cookie.
6. The method of claim 1, wherein after the sending the first target resource to the terminal device, the method further comprises:
receiving a second access request sent by the terminal equipment, wherein the second access request carries second domain name information;
responding to the second access request, and if the target login mode is started, receiving a second cookie sent by the terminal equipment, wherein the second cookie carries the first access information, and the first access information comprises identity information and key information of the first access party;
generating a second resource request according to the second access request and the first access information;
responding to the second resource request, and acquiring a second target resource associated with the second domain name information;
and sending the second target resource to the terminal equipment.
7. The method of claim 1, wherein after the sending the first target resource to the terminal device, the method further comprises:
if the terminal equipment responds to the access switching request, receiving a third cookie sent by the terminal equipment under the condition that a target login mode is started, wherein the third cookie carries second access information, and the second access information comprises identity information and key information of a second access party;
generating a third resource request according to the first access request and the second access information;
responding to the third resource request, and acquiring a third target resource associated with the first domain name information;
and sending the third target resource to the terminal equipment.
8. The method according to any one of claims 1 to 7, wherein the generating a first resource request from the first access request and the first access information comprises:
generating an interface call request according to the first access request, wherein the interface call request is used for requesting to call an Application Programming Interface (API);
generating the first resource request according to the interface call request and the first access information;
The obtaining the first target resource associated with the first domain name information includes:
and calling the API to acquire the first target resource associated with the first domain name information.
9. The method of claim 8, wherein generating the first resource request from the interface call request and the first access information comprises:
packaging the interface call request and the first access information to obtain the first resource request;
the calling the API to acquire the first target resource associated with the first domain name information comprises the following steps:
calling the API to analyze the first resource request to obtain first access information to be verified, wherein the first access information to be verified comprises identity information to be verified and key information to be verified;
and if the identity information to be verified is consistent with the pre-stored identity information, the key information to be verified is consistent with the pre-stored key information, and the identity information to be verified is successfully matched with the key information to be verified, acquiring the first target resource associated with the first domain name information.
10. The method of claim 8, wherein generating the first resource request from the interface call request and the first access information comprises:
Acquiring key information of the first access party from the first access information;
encrypting the interface call request by adopting the key information of the first access party to obtain an encrypted interface call request;
encapsulating the encrypted interface call request and the identity information of the first access party to obtain the first resource request;
the calling the API obtains the first target resource associated with the first domain name information, including,
calling the API to analyze the first resource request to obtain the encrypted interface calling request and the identity information of the first access party;
calling the API, and acquiring key information of a first access party according to the identity information of the first access party;
and if the encrypted interface call request is successfully decrypted by using the key information of the first access party, acquiring the first target resource associated with the first domain name information.
11. A method of resource access, comprising:
responding to domain name input operation, sending a first access request to a server so that the server obtains a first target resource associated with first domain name information according to a first resource request under the condition that a target login mode is started, wherein the first access request carries the first domain name information, the first resource request is generated according to the first access request and the first access information, and the first access information is information stored in the server in advance, or the first access information is information carried by terminal equipment in a first small text file cookie and transmitted to the server;
Receiving a first target resource sent by the server;
and rendering and displaying the first target resource.
12. The method of claim 11, wherein the method further comprises:
responding to domain name input operation, sending a second access request to the server so that the server obtains second target resources associated with second domain name information according to a second resource request under the condition that a target login mode is started, wherein the second access request carries the second domain name information, the second resource request is generated according to the second access request and the first access information, and the first access information is information carried by the terminal equipment in a second cookie and transmitted to the server;
receiving a second target resource sent by the server;
and rendering and displaying the second target resource.
13. The method of claim 11, wherein the method further comprises:
responding to a selection operation aiming at an information viewing control, and displaying account information and a switching control corresponding to the account information, wherein the account information is bound with second access information, and the second access information comprises identity information and key information of a second access party;
Responding to the selection operation aiming at the switching control, sending a third cookie to the server so that the server obtains a third target resource associated with the first domain name information according to a third resource request under the condition that the target login mode is started, wherein the third cookie carries second access information, and the third resource request is generated according to the first access request and the second access information;
receiving a third target resource sent by the server;
and rendering and displaying the third target resource.
14. The method according to any one of claims 11 to 13, further comprising:
displaying an information entry area in response to an information adding operation;
and responding to the input operation aiming at the information input area, and storing the account information, the identity information and the key information of the access party in a local storage.
15. The method according to any one of claims 11 to 13, further comprising:
and deleting account information, identity information and key information of the access party from the local storage of the browser in response to the information deleting operation.
16. A resource access device, comprising:
the receiving module is used for receiving a first access request sent by the terminal equipment, wherein the first access request carries first domain name information;
the acquisition module is used for responding to the first access request, and acquiring first access information of a first access party if a target login mode is started, wherein the first access information is information stored in a server in advance, or the first access information is information carried by the terminal equipment in a first small text file cookie and transmitted to the server;
the generation module is used for generating a first resource request according to the first access request and the first access information;
the acquisition module is further used for responding to the first resource request and acquiring a first target resource associated with the first domain name information;
and the sending module is used for sending the first target resource to the terminal equipment.
17. A resource access device, comprising:
the system comprises a sending module, a server and a terminal device, wherein the sending module is used for responding to domain name input operation, sending a first access request to the server so that the server obtains first target resources associated with first domain name information according to a first resource request under the condition that a target login mode is started, wherein the first access request carries the first domain name information, the first resource request is generated according to the first access request and the first access information, and the first access information is information prestored in the server, or the first access information is information carried by the terminal device in a first small text file cookie and transmitted to the server;
The receiving module is used for receiving the first target resource sent by the server;
and the display module is used for rendering and displaying the first target resource.
18. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 10 or the steps of the method of any one of claims 11 to 15.
19. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 10, or the steps of the method of any one of claims 11 to 15.
20. A computer program product comprising a computer program, characterized in that the computer program when executed by a processor realizes the steps of the method of any one of claims 1 to 10 or the steps of the method of any one of claims 11 to 15.
CN202211064507.4A 2022-09-01 2022-09-01 Resource access method, related device, equipment and storage medium Pending CN117675255A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211064507.4A CN117675255A (en) 2022-09-01 2022-09-01 Resource access method, related device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211064507.4A CN117675255A (en) 2022-09-01 2022-09-01 Resource access method, related device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117675255A true CN117675255A (en) 2024-03-08

Family

ID=90064986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211064507.4A Pending CN117675255A (en) 2022-09-01 2022-09-01 Resource access method, related device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117675255A (en)

Similar Documents

Publication Publication Date Title
US9965565B2 (en) Methods and terminals for generating and reading 2D barcode and servers
TWI606360B (en) Method, apparatus and system for detecting webpages
CN108536783B (en) Data processing method and device, terminal and computer readable storage medium
CN110198301B (en) Service data acquisition method, device and equipment
CN110716850B (en) Page testing method, device and system and storage medium
CN105471931B (en) Method, device and system for inquiring service data
CN107040543B (en) Single sign-on method, terminal and storage medium
CN111478849B (en) Service access method, device and storage medium
WO2020164526A1 (en) Control method for nodes in distributed system and related device
JP2015536121A (en) Router access control method, router access control apparatus, and network system
CN109257336B (en) Block chain-based password information processing method and terminal equipment
CN110869907A (en) Method and terminal for browsing application page
US9686819B2 (en) Methods, devices and systems for router access control
CN107395560B (en) Security verification and initiating and managing method, equipment, server and storage medium thereof
WO2015067114A1 (en) Method, apparatus, terminal and media for detecting document object model-based cross-site scripting attack vulnerability
WO2015003636A1 (en) Method and device for interception of page elements
JP2020509622A (en) Wireless network type detection method and apparatus and electronic device
US11882154B2 (en) Template representation of security resources
CN109040339B (en) Cross-domain request processing method, device and equipment based on AJAX
US20160156629A1 (en) Information processing method, information processing apparatus, and storage medium
CN113037741A (en) Authentication method and related device
WO2015101302A1 (en) Data sharing method, system, user end and background server
CN110445746B (en) Cookie obtaining method and device and storage equipment
CN107577933B (en) Application login method and device, computer equipment and computer readable storage medium
WO2015003570A1 (en) Data downloading method,device and system thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination