CN112448917A - Website login method and device, readable medium and electronic equipment - Google Patents

Website login method and device, readable medium and electronic equipment Download PDF

Info

Publication number
CN112448917A
CN112448917A CN201910809438.7A CN201910809438A CN112448917A CN 112448917 A CN112448917 A CN 112448917A CN 201910809438 A CN201910809438 A CN 201910809438A CN 112448917 A CN112448917 A CN 112448917A
Authority
CN
China
Prior art keywords
login
user
authorization
link
service terminal
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.)
Granted
Application number
CN201910809438.7A
Other languages
Chinese (zh)
Other versions
CN112448917B (en
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910809438.7A priority Critical patent/CN112448917B/en
Publication of CN112448917A publication Critical patent/CN112448917A/en
Application granted granted Critical
Publication of CN112448917B publication Critical patent/CN112448917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a website login method, a website login device, a storage medium and electronic equipment, and relates to the technical field of computers. The website login method comprises the following steps: generating a login link; generating a two-dimensional code according to the login link and displaying the two-dimensional code; after a user scans the two-dimensional code through a service terminal to complete login authorization, receiving an authorization parameter sent by the service terminal to the website background service link; requesting open authorization authentication from the service terminal according to the client key and the authorization parameter to obtain and store user login information; and determining to jump to the login page according to the polling result. According to the technical scheme of the embodiment of the invention, the two-dimensional code is generated, the user login information is obtained according to the authorization parameter sent after the code scanning authorization of the service terminal is used, the polling result is obtained, and the login page is determined to jump to according to the polling result, so that the website can be logged in without the audit of the service terminal, and the method is simple and convenient.

Description

Website login method and device, readable medium and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a website login method, a website login device, a computer readable storage medium and electronic equipment.
Background
With the rapid development of the internet industry, internet application products become more and more. These internet applications are not affiliated with the same internet product developer, and each product usually needs to maintain a set of exclusive user data and login mode.
From the perspective of the user, it is inconvenient for the user to remember the login account and the password information of the application software every time the user uses one application software. From the perspective of a developer, when the personal information of too many users is not needed and only the logged-in user needs to be identified, the development and maintenance cost for completely and autonomously constructing a set of login authorization system and a human-computer interaction interface is relatively high.
Aiming at the current situation, the third-party application establishes a third-party login authorization service, the third-party application accessing the service can initiate an authorization request to a third-party authorization platform when a user requests to login, and simultaneously guides the user to the third-party authorization platform with the account owned by the user to complete login authority verification. After verification is completed, the third-party authorization platform guides the user back to the third-party application, attaches the user identification and desensitized user basic information in the parameters and sends the parameters to the third-party application, and the third-party application can obtain the user identification and desensitized user basic information through a decryption process.
Taking WeChat as an example, the current practice in the third party authorization field is to open a platform third party authorization login manner. The third party application developer must apply for the WeChat open platform account number, bind the application of the developer to the open platform account number and submit the application to the audit to pass. When a developer of the third-party application uses the WeChat open platform account, authentication cost needs to be paid, and when the third-party application is bound to the open platform account, the developer needs to wait for a plurality of working days at most.
How to simply and conveniently perform login authorization of third-party applications is a technical problem which needs to be solved urgently at present.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a website login method, a website login device, a computer readable storage medium and electronic equipment, so that login authorization of third-party application can be simply and conveniently carried out at least to a certain extent.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
According to a first aspect of the embodiments of the present invention, there is provided a website login method, including: generating a login link, wherein the login link comprises a user identification code, a client identification code, a website background service link and a request scope; generating a two-dimensional code according to the login link and displaying the two-dimensional code; after a user scans the two-dimensional code through a service terminal to complete login authorization, receiving an authorization parameter sent by the service terminal to the website background service link; requesting open authorization authentication from the service terminal according to a client key and the authorization parameter to obtain and store user login information, wherein the user login information comprises a login success state and the user basic information, the user basic information corresponds to the user identification code, and the user basic information is generated by the service terminal according to the request scope; and determining to jump to a login page according to a polling result, wherein the polling result is obtained by polling the stored user login information.
In some embodiments, before generating and displaying the two-dimensional code according to the login link, the method further includes: and acquiring the client identification code and the client key authorized by the service terminal.
In some embodiments, before generating and displaying the two-dimensional code according to the login link, the method further includes: and generating a user identification code according to the session identification of the webpage accessed by the user or randomly generating the user identification code.
In some embodiments, the obtaining and storing user login information includes: and acquiring user login information and storing the user login information in a database or a cache.
In some embodiments, before the determining to jump to the landing page according to the polling result, the method further includes: sending a polling request to the database or cache, wherein the polling request comprises the user identification code; receiving a polling result sent by the database or the cache and responding to the polling request; and if the polling result contains user login information corresponding to the user identification code, determining to jump to a login page.
In some embodiments, the generating a two-dimensional code according to the login link includes: and generating a two-dimensional code according to the login link by using the open source plug-in.
In some embodiments, the requesting the open authorization from the service terminal according to the client key, the client identification code, and the authorization parameter includes: sending the authorization code and the client key to the service terminal; receiving a token returned by the service terminal; and acquiring the user login information according to the token.
According to a second aspect of the embodiments of the present invention, there is provided a website login apparatus, including: the system comprises a first generation unit, a second generation unit and a third generation unit, wherein the first generation unit is used for generating a login link, and the login link comprises a user identification code, a client identification code, a website background service link and a request scope; the second generating unit is used for generating a two-dimensional code according to the login link and displaying the two-dimensional code; the receiving unit is used for receiving the authorization parameters sent by the service terminal to the website background service link after the user scans the two-dimensional code through the service terminal to complete login authorization; the authentication unit is used for requesting open authorization authentication to the service terminal according to a client key and the authorization parameter to obtain and store user login information, wherein the user login information comprises a login success state and the user basic information, the user basic information corresponds to the user identification code, and the user basic information is generated by the service terminal according to the request scope; and the determining unit is used for determining to jump to a login page according to a polling result, wherein the polling result is obtained by polling the stored user login information.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the website login method as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the website login method as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical scheme provided by some embodiments of the invention, the two-dimensional code is generated, the user login information is obtained according to the authorization parameter sent after the code scanning authorization of the service terminal is used, the polling result is obtained, and the login page is determined to jump to according to the polling result, so that the website can be logged in without the verification of the service terminal, and the method is simple and convenient.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a flow chart schematically illustrating a method of website login in the related art;
FIG. 2 schematically illustrates a flow diagram of a method of website login in accordance with one embodiment of the present invention;
FIG. 3 schematically illustrates a flow diagram of a method of website login in accordance with another embodiment of the present invention;
FIG. 4 schematically shows a block diagram of a website login apparatus according to an embodiment of the present invention;
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In the related art, as shown in fig. 1, a third party authorization login method of a wechat open platform may be used when performing third party login authorization. In step S102, the user accesses the website and requests login. In step S104, the website generates an authorization login link, where the link includes a user identifier, a client identifier, a website background service link, and a request scope, where the request scope is a request login authorization. In step S106, the website directs the page to the wechat authorization login link. In step S108, the user scans a code through a wechat app (Application) and completes login authorization. In step S110, the WeChat jumps the page to a website background service link, and attaches a parameter for open authorization. The parameters include user login authorization information. The user login authorization information is returned by the WeChat according to the request scope in the authorization login link generated in step S104. In step S112, the website performs an open authorization authentication process according to the parameters transmitted by the WeChat, and finally jumps to the logged-in page after obtaining the user information.
In the third party authorized login manner shown in fig. 1, a developer of a third party application must apply for an open platform account, bind the application of the developer to the open platform account, and submit the application to be checked and approved. The account number of the open platform generally needs to be paid and then used for payment, and a plurality of working days at most need to be waited when the third-party application is bound to the open platform. Therefore, the open platform third party authorized login method is high in cost and long in time consumption.
In order to solve the above technical problems, embodiments of the present invention provide a website login method, so as to simply and conveniently perform login authorization for a third-party application.
Fig. 2 schematically shows a website login method of an exemplary embodiment of the present invention. Referring to fig. 2, the website login method may include the steps of:
step S202, a login link is generated, wherein the login link comprises a user identification code, a client identification code, a website background service link and a request scope.
And step S204, generating the two-dimensional code according to the login link and displaying the two-dimensional code.
And step S206, after the user scans the two-dimensional code through the service terminal to complete login authorization, receiving an authorization parameter sent by the service terminal to the website background service link.
Step S208, according to the client key and the authorization parameter, open authorization authentication is requested to the service terminal, user login information is obtained and stored, the user login information comprises a login success state and user basic information, the user basic information corresponds to the user identification code, and the user basic information is generated by the service terminal according to the request scope.
And step S210, determining to jump to a login page according to a polling result, wherein the polling result is obtained by polling the stored user login information.
In the technical scheme of the embodiment of the invention, the login link and the two-dimensional code are generated, the open authorization authentication is carried out after the user finishes login authorization by scanning the code through the service terminal, so as to obtain the basic information of the user, finally, the user login information is polled, and whether the user corresponding to the login link passes the login authorization or not can be judged by judging whether the polling result comprises the user login information corresponding to the login link or not.
In addition, because the generation logic of the two-dimensional code is arranged at the server side of the third-party application, but not at the service terminal of the third-party service, the personalized two-dimensional code login page can be designed according to the website requirement.
Here, the third party service may be WeChat. WeChat is one of the social applications of the internet with the largest user quantity and the widest coverage at present, not only has a systematic developer ecosystem, but also provides complete webpage authorization and third-party log-in machine for public numbers, small programs and other website applications through an open platform. In the related art, what is common in the third party login authorization field is a third party authorization login mode of a WeChat open platform.
Before the login link is generated in step S202, the developer is required to apply for a free wechat public platform test number in order to obtain appId (client identification code) and appserver (client key) authorized by the wechat service terminal.
In the related art, when the trusted open platform is used to realize the authorized login of the third-party website, the scope parameter of the authorized login link is scope ═ snsapi _ login, which means login authorization. In the embodiment of the present invention, for the authorized login of the third-party website implemented by using the WeChat public platform, the scope parameter in the authorized login link may be set to scope _ snsapi _ base or snsapi _ userinfo, where scope _ snsapi _ base means to obtain the basic information of the user, and snsapi _ userinfo means to obtain the detailed information of the user.
Before the login link is generated in step S202, the user identification code may also be generated according to the session identification of the user accessing the webpage or randomly generated.
The user identification code in the login link is a temporary identification code which is self-defined by the server and is used for identifying the user session of the currently accessed website, and the identification code can be randomly generated but must be unique to the session. In some applications based on Java servlets (server-side programs written in Java programming language), session identification can also be used as a user identification code, but developers need to solve the problem of session synchronization in the case of distributed deployment. In addition, cookies may also be utilized to resolve synchronization issues for sessions. Since the form of the login link is slightly letter-defined and relatively fixed, the user identification code can be carried by directly utilizing a state parameter in the link. For example, the login link may be:
https://open.weixin.qq.com/connect/oauth2.0/authorizeappid=%s&redi rect_url=%s&response_type=code&scope=snsapi_userinfo&state=client_id#wechat_redirect。
after the login link is generated in step S202, in step S204, a two-dimensional code generation logic may be set at the front end of the server of the third-party application, and the open source plug-in is used to generate the two-dimensional code according to the login link, so that the pressure on the server of the third-party application may be reduced.
In addition, the generation logic of the two-dimensional code can also be placed in a background service of a server side of a third-party application.
After the server side of the third-party application generates and displays the two-dimensional code, a user can open a scanning function of the WeChat, scan the login two-dimensional code on the display page, and finish authorization according to the WeChat prompt. And the WeChat service terminal sends the authorization parameters completing authorization to the website background service link in the login link.
In step S208, the server of the third-party application requests the service terminal for open authorization authentication according to the authorization parameter and the client key and according to the oauth2.0 standardized general flow, and obtains the user login information from the service terminal and stores the user login information in the database or the cache.
In step S208, when performing Open Authorization (Open Authorization) authentication, the service terminal of the third-party service and the server of the third-party application actually undergo an Authorization authentication procedure of oauth2.0(Open Authorization 2.0). Specifically, the server side of the third-party application may send the authorization code and the client-side key to the service terminal, receive a token returned by the service terminal, and obtain the user login information according to the token.
After the oauth2.0 authorization process is completed, the server of the third-party application acquires the unique identifier of the WeChat user and the basic information of the user, and at this time, the server stores the user identifier of the user and the corresponding relationship of the information in a database or a cache for polling and inquiring a website login page.
The cache can be a redis cache, and the polling response speed can be greatly improved by adopting the redis cache.
In the embodiment of the present invention, in addition, the server side of the third-party application needs to have a function of polling the login result of the user. Specifically, a fixed time interval is written in a front-end script of the server, the fixed time interval may be 2 seconds, a request carrying a user identification code is sent to a background service of the server of the third-party application according to the fixed time interval to query a user login state, if the background service of the server returns login success and user personal basic information, the page is controlled to jump to a post-login page, and otherwise no action is performed.
Before step S210, a polling request needs to be sent to the database or the cache, where the polling request includes the user identification code; receiving a polling result sent by a database or a cache and responding to the polling request; and if the polling result contains user login information corresponding to the user identification code, determining to jump to a login page.
In the polling process of the website login page, once the login state of the current user identification code is inquired to be the login success, a page jump reaction is immediately made, and the page is guided to the logged-in page; if the user login is failed to be inquired or the user login state is not inquired all the time, the page does not make any reaction.
As shown in fig. 3, the website login method according to an embodiment of the present invention may include the following steps:
step S302, the user accesses the website and requests to log in.
In step S304, the website generates an authorized login link. The link comprises a user identification code, a client identification code, a website background service link and a request scope, wherein the request scope is the basic information of a requesting user.
And S306, converting the link into the two-dimensional code by the website by using the two-dimensional code generating plug-in, placing the two-dimensional code in a user-defined page for displaying the two-dimensional code, and starting to poll a user login result to the background.
And step S308, the user scans the code through the WeChat app and finishes login authorization.
And step S310, skipping the page to a website background service link by the WeChat, and attaching parameters for open authorization. The parameters include authorization parameters and user basic information. The user basic information requests scope return according to the authorized login link generated in step S304.
Step S312, the website performs an open authorization authentication process according to the parameters transmitted by the WeChat, and finally stores the user information after obtaining the user information.
Step S314, polling to obtain user login information, and jumping the page to a login page.
In the website login method provided by some embodiments of the present invention, the two-dimensional code is generated, the user login information is obtained according to the authorization parameter sent after the code scanning authorization of the service terminal is used, and the polling result is obtained, so as to determine to jump to the login page according to the polling result, thereby realizing that the website can be logged in without the verification of the service terminal, which is simple and convenient.
The following describes embodiments of the apparatus of the present invention, which can be used to execute the website login method of the present invention. Referring to fig. 4, a website login device 400 according to an embodiment of the present invention includes:
the first generating unit 402 is configured to generate a login link, where the login link includes a user identifier, a client identifier, a website background service link, and a request scope.
And a second generating unit 404, configured to generate a two-dimensional code according to the login link and display the two-dimensional code.
The receiving unit 406 is configured to receive an authorization parameter sent by the service terminal to the website background service link after the user scans the two-dimensional code through the service terminal to complete login authorization.
And an authentication unit 408, configured to request open authorization authentication from the service terminal according to the client key and the authorization parameter, obtain and store user login information, where the user login information includes a login success state and user basic information, the user basic information corresponds to the user identification code, and the user basic information is generated by the service terminal according to the request scope.
The determining unit 410 is configured to determine to jump to the login page according to a polling result, where the polling result is obtained by polling the stored user login information.
In the technical scheme of the embodiment of the invention, the login link and the two-dimensional code are generated, the open authorization authentication is carried out to obtain the basic information of the user after the user finishes the login authorization by scanning the code through the service terminal, finally, the login information of the user is polled, and whether the polling result contains the login information of the user corresponding to the login link is judged.
In addition, because the generation logic of the two-dimensional code is arranged at the server side of the third-party application, but not at the service terminal of the third-party service, the personalized two-dimensional code login page can be designed according to the website requirement.
The second generation unit 404 generates a two-dimensional code from the login link using an open source plug-in.
The authentication unit 408 is also used to obtain the user login information and store it in the database or cache. The authorization parameter includes an authorization code, and the authentication unit 408 is further configured to send the authorization code and the client-side key to the service terminal; receiving a token returned by the service terminal; and acquiring the user login information according to the token.
The website login apparatus 400 provided by the embodiment of the present invention may further include an obtaining unit, a generating unit, and a polling unit.
The obtaining unit is used for obtaining the client identification code and the client key authorized by the service terminal.
The generating unit is used for generating a user identification code according to the session identification of the user accessing the webpage or randomly generating the user identification code.
The polling unit is used for sending a polling request to the database or the cache, wherein the polling request comprises the user identification code; receiving a polling result sent by the database or the cache and responding to the polling request; and if the polling result contains user login information corresponding to the user identification code, determining to jump to a login page.
For details that are not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the website login method of the present invention described above.
In the website login device provided by the embodiment of the invention, the user login information is obtained by generating the two-dimensional code and according to the authorization parameter sent after the code scanning authorization of the service terminal is used, and the polling result is obtained, so that the user can jump to the login page according to the polling result, the website can be logged in without the verification of the service terminal, and the website login device is simple and convenient.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The computer system 500 of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device implements the website login method as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 2: step S202, generating a login link; step S204, generating a two-dimensional code according to the login link and displaying the two-dimensional code; step S206, after the user scans the two-dimensional code through the service terminal to complete login authorization, receiving an authorization parameter sent by the service terminal to the website background service link; step S208, according to the client key and the authorization parameter, requesting the service terminal for open authorization authentication to obtain and store user login information; and step S210, determining to jump to a login page according to the polling result.
As another example, the electronic device may implement the steps shown in fig. 3.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for website login, the method comprising:
generating a login link, wherein the login link comprises a user identification code, a client identification code, a website background service link and a request scope;
generating a two-dimensional code according to the login link and displaying the two-dimensional code;
after a user scans the two-dimensional code through a service terminal to complete login authorization, receiving an authorization parameter sent by the service terminal to the website background service link;
requesting open authorization authentication from the service terminal according to a client key and the authorization parameter to obtain and store user login information, wherein the user login information comprises a login success state and user basic information, the user basic information corresponds to the user identification code, and the user basic information is generated by the service terminal according to the request scope;
and determining to jump to a login page according to a polling result, wherein the polling result is obtained by polling the stored user login information.
2. The method of claim 1, wherein before generating and presenting the two-dimensional code according to the login link, the method further comprises:
and acquiring the client identification code and the client key authorized by the service terminal.
3. The method of claim 1, wherein before generating and presenting the two-dimensional code according to the login link, the method further comprises:
and generating a user identification code according to the session identification of the webpage accessed by the user or randomly generating the user identification code.
4. The method of claim 1, wherein obtaining and storing user login information comprises: and acquiring user login information and storing the user login information in a database or a cache.
5. The method of claim 4, wherein determining before jumping to a landing page based on the polling result, further comprises:
sending a polling request to the database or cache, wherein the polling request comprises the user identification code;
receiving a polling result sent by the database or the cache and responding to the polling request;
and if the polling result contains user login information corresponding to the user identification code, determining to jump to a login page.
6. The method of claim 1, wherein generating the two-dimensional code according to the login link comprises: and generating a two-dimensional code according to the login link by using the open source plug-in.
7. The method of claim 1, wherein the authorization parameter comprises an authorization code, and wherein requesting open authorization authentication from the service terminal according to a client key, the client identification code, and the authorization parameter comprises:
sending the authorization code and the client key to the service terminal;
receiving a token returned by the service terminal;
and acquiring the user login information according to the token.
8. A website login apparatus, the apparatus comprising:
the system comprises a first generation unit, a second generation unit and a third generation unit, wherein the first generation unit is used for generating a login link, and the login link comprises a user identification code, a client identification code, a website background service link and a request scope;
the second generating unit is used for generating a two-dimensional code according to the login link and displaying the two-dimensional code;
the receiving unit is used for receiving the authorization parameters sent by the service terminal to the website background service link after the user scans the two-dimensional code through the service terminal to complete login authorization;
the authentication unit is used for requesting open authorization authentication to the service terminal according to a client key and the authorization parameter to obtain and store user login information, wherein the user login information comprises a login success state and the user basic information, the user basic information corresponds to the user identification code, and the user basic information is generated by the service terminal according to the request scope;
and the determining unit is used for determining to jump to a login page according to a polling result, wherein the polling result is obtained by polling the stored user login information.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, implements the website login method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the website login method according to any one of claims 1 to 7.
CN201910809438.7A 2019-08-29 2019-08-29 Website login method and device, readable medium and electronic equipment Active CN112448917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910809438.7A CN112448917B (en) 2019-08-29 2019-08-29 Website login method and device, readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910809438.7A CN112448917B (en) 2019-08-29 2019-08-29 Website login method and device, readable medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112448917A true CN112448917A (en) 2021-03-05
CN112448917B CN112448917B (en) 2023-08-04

Family

ID=74741315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910809438.7A Active CN112448917B (en) 2019-08-29 2019-08-29 Website login method and device, readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112448917B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918927A (en) * 2021-10-22 2022-01-11 苏州万店掌网络科技有限公司 Authorized terminal distribution method and device and authorized terminal acquisition method and device
CN116756446A (en) * 2023-08-23 2023-09-15 北京创新乐知网络技术有限公司 Login method, device, medium and equipment based on scanning two-dimension code

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023919A (en) * 2012-12-26 2013-04-03 百度在线网络技术(北京)有限公司 Two-dimensional code based login control method and two-dimensional code based login control system
CN103067381A (en) * 2012-12-26 2013-04-24 百度在线网络技术(北京)有限公司 Third-party service login method, login system and login device by means of platform-party account
CN103177377A (en) * 2012-10-22 2013-06-26 任明和 Cloud architecture system of two-dimension code application
CN103475480A (en) * 2013-09-05 2013-12-25 北京星网锐捷网络技术有限公司 Certificate authority method and device
CN103795731A (en) * 2014-02-26 2014-05-14 北京京东尚科信息技术有限公司 User account login method
CN104253784A (en) * 2013-06-25 2014-12-31 腾讯科技(深圳)有限公司 Logging and authorization method and system
CN106559384A (en) * 2015-09-25 2017-04-05 阿里巴巴集团控股有限公司 A kind of utilization public number realizes the method and device for logging in
CN107066491A (en) * 2016-12-28 2017-08-18 北京五八信息技术有限公司 The method and device of quick log-on webpage application
CN108632291A (en) * 2018-05-16 2018-10-09 阿里巴巴集团控股有限公司 A kind of third party authorizes login method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177377A (en) * 2012-10-22 2013-06-26 任明和 Cloud architecture system of two-dimension code application
CN103023919A (en) * 2012-12-26 2013-04-03 百度在线网络技术(北京)有限公司 Two-dimensional code based login control method and two-dimensional code based login control system
CN103067381A (en) * 2012-12-26 2013-04-24 百度在线网络技术(北京)有限公司 Third-party service login method, login system and login device by means of platform-party account
CN104253784A (en) * 2013-06-25 2014-12-31 腾讯科技(深圳)有限公司 Logging and authorization method and system
US20150304301A1 (en) * 2013-06-25 2015-10-22 Tencent Technology (Shenzhen) Company Limited Systems and Methods for Login and Authorization
CN103475480A (en) * 2013-09-05 2013-12-25 北京星网锐捷网络技术有限公司 Certificate authority method and device
CN103795731A (en) * 2014-02-26 2014-05-14 北京京东尚科信息技术有限公司 User account login method
CN106559384A (en) * 2015-09-25 2017-04-05 阿里巴巴集团控股有限公司 A kind of utilization public number realizes the method and device for logging in
CN107066491A (en) * 2016-12-28 2017-08-18 北京五八信息技术有限公司 The method and device of quick log-on webpage application
CN108632291A (en) * 2018-05-16 2018-10-09 阿里巴巴集团控股有限公司 A kind of third party authorizes login method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918927A (en) * 2021-10-22 2022-01-11 苏州万店掌网络科技有限公司 Authorized terminal distribution method and device and authorized terminal acquisition method and device
CN113918927B (en) * 2021-10-22 2023-04-14 苏州万店掌网络科技有限公司 Authorized terminal distribution method and device and authorized terminal acquisition method and device
CN116756446A (en) * 2023-08-23 2023-09-15 北京创新乐知网络技术有限公司 Login method, device, medium and equipment based on scanning two-dimension code
CN116756446B (en) * 2023-08-23 2023-11-10 北京创新乐知网络技术有限公司 Login method, device, medium and equipment based on scanning two-dimension code

Also Published As

Publication number Publication date
CN112448917B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN109150978B (en) Method and device for debugging micro service
US10462118B2 (en) Systems and methods for login and authorization
CN111062024B (en) Application login method and device
US9548975B2 (en) Authentication method, authentication system, and service delivery server
CN101771993B (en) System and method thereof for realizing polymerization application based on mobile network
US10467385B2 (en) User-specific application activation for remote sessions
CN103428179B (en) A kind of log in the method for many domain names website, system and device
CN105007280A (en) Application sign-on method and device
CN113079164B (en) Remote control method and device for bastion machine resources, storage medium and terminal equipment
CN110602088A (en) Block chain-based right management method, block chain-based right management device, block chain-based right management equipment and block chain-based right management medium
CN111274591A (en) Method, device, electronic equipment and medium for accessing Kubernetes cluster
CN110708335A (en) Access authentication method and device and terminal equipment
CN110324185B (en) Hyper-parameter tuning method, device, server, client and medium
CN112448917A (en) Website login method and device, readable medium and electronic equipment
CN114745156A (en) Distributed single sign-on realization method and device, electronic equipment and storage medium
CN112966257A (en) Authorization method and device for application program
CN112491940B (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN112653673A (en) Multi-factor authentication method and system based on single sign-on
CN111030900A (en) Authentication-free login method and device and electronic equipment
CN111030816A (en) Authentication method and device for access platform of evidence obtaining equipment and storage medium
CN108141434B (en) Providing multi-factor authentication credentials via device notifications
CN108804713B (en) Image output method, electronic device, and computer-readable medium
CN114417318A (en) Third-party page jumping method and device and electronic equipment
JP2023504956A (en) Performance detection method, device, electronic device and computer readable medium
CN115348462B (en) Method, device, equipment, storage medium and communication system for configuring special effect data

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
GR01 Patent grant
GR01 Patent grant