Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before proceeding with the detailed description, the related terms referred to in this application are all known and understood by those skilled in the art, and are explained in detail.
The internet product refers to integration of functions and services for operation created by a website based on internet technology to meet user demands. Internet products are classified according to service objects and can be classified into user-oriented products and customer-oriented products. The product facing the client mainly faces to specific organizations (enterprises, communities, governments and the like), and compared with personal users, the product facing the client is more reasonable, and a clear business index is often used as a measuring basis of the user value. The internet products are inseparable from the production and operation activities of enterprises, and when the enterprises develop, more and more internet products are needed by management enterprises, so that the switching among different internet products is needed frequently. For example, a mobile phone company develops a plurality of series of mobile phones, and the plurality of series of mobile phones of the company need to be managed in a unified manner, and each series of mobile phones of the plurality of series of mobile phones need to be managed separately. For example, a company needs a brand mobile phone management system, and for example, an X-series brand mobile phone is used in a plurality of series mobile phones, and an X-brand mobile phone inventory management system, an X-brand mobile phone pre-sale management system, an X-brand mobile phone after-sale management system, and the like are needed.
The client (or browser) and the server generally communicate via the hypertext transfer protocol (HTTP), and HTTP itself is stateless, and the server does not know who sent the received request, and therefore needs to carry identity information in the sent request. The general solution is that, each time logging in, the server generates a token (token) and returns the token to the client (or browser), the server stores the token in the database, and the client (or browser) can identify the identity of the client (or browser) by attaching the token each time sending a request. When the server receives a login request sent by a client (or a browser), the token carried in the login request is compared with the token stored in the database for verification, and the client (or the browser) can successfully log in when the verification passes.
In the embodiment of the present application, an internet product (multiple management systems) that an enterprise needs to use in a production operation is taken as an example for description, an execution subject of the multi-product login management method is a client (or a browser), and the embodiment takes the browser as an example for description.
Example one
Fig. 1 is a flowchart of a multi-product login management method according to an embodiment of the present application. The embodiment can be applied to the situation that a plurality of products need to be logged in, and is particularly applicable to the situation that the login rights of the client (or the browser) for the plurality of products may be different. The method may be performed by a multi-product login management apparatus, which may be implemented in software and/or hardware, for example, which may be configured in a computer device. As shown in fig. 1, the method includes:
and S110, after logging in the multi-product login management page, accessing an Application Program Interface (API) corresponding to the server to obtain a login token returned by the server and storing the login token.
In the embodiment of the application, the login request can be a request of a user for logging in an internet product through a browser. Illustratively, after a user inputs an account and a password in a browser to log in a multi-product login management page, the browser accesses an API interface corresponding to a server, obtains a login token generated by the server, and stores the obtained login token.
In one embodiment, the retrieved login token may be saved in a local storage (localstorage) of the browser, or may be saved in a cache (cookies) of the browser, for example.
The storage method of the login token by the browser is not limited to the method described in the above embodiment, and the login token returned by the server may be stored so that the browser can retrieve the login token when logging in the internet product next time. S120, selecting a first product in a plurality of products in the multi-product login management page; wherein the multi-product login management page comprises the plurality of products.
The multiple products are displayed in the multi-product login management page in a thumbnail or list mode, and a user selects a first product in the multiple products to log in a browser, wherein the first product is any one of the multiple products.
In one embodiment, taking an example that thumbnails show a plurality of products as an example, thumbnails of the products shown in the multi-product login page are respectively associated with links of product management pages corresponding to the products, and the multi-product login management page has obtained rights, the login rights of the products can be uniformly managed, so that a user can select a product to be accessed from the multi-product login management page, and jump to a management page corresponding to the selected product after clicking the selected product.
It should be noted that the unified management authority of the multi-product login management page for the multiple products displayed on the multi-product login management page is preset during the design of the multi-product login management page, and a user can directly achieve the purpose of accessing the products when logging in the displayed products by using the multi-product login management page.
S130, login authority verification is conducted on the first product, and after the authority verification is passed, the management page corresponding to the first product is skipped to.
After a user selects a first product in the multi-product login management page, before the page jumps to the first product, the login authority of the user is verified, and only after the login authority of the user is verified, the user jumps to the management page corresponding to the first product.
In one embodiment, for a user, after logging on to the multi-product login management page, a plurality of products are shown in the multi-product login management page, but the user does not have access to all the products shown. Taking the example that the user selects to access the first product, when the user has access right to the first product, the user selects the first product in the multi-product login management page and can directly jump to the management page corresponding to the first product; when the user does not have access right to the first product, the user selects the first product from the multi-product login management page and cannot jump to the management page corresponding to the first product successfully.
After logging in a multi-product login management page, accessing an application program interface corresponding to the server to obtain a login token returned by the server and storing the login token; selecting a first product of a plurality of products in the multi-product login management page; wherein the multi-product login management page comprises the plurality of products; and performing login authority verification on the first product, and jumping to a management page corresponding to the first product after the authority verification is passed. The login management can be uniformly carried out on the multiple products, the login authorities of the multiple products are respectively verified, and the working efficiency is improved.
On the basis of the above scheme, after jumping to the management page corresponding to the first product, the method further includes: responding to the operation of returning to the multi-product login management page and selecting a second product, performing login authority verification on the second product, and jumping to a management page corresponding to the second product after the authority verification.
In one embodiment, after the user logs in the multi-product login management page, selects the first product and jumps to the management page corresponding to the first product, the user may further perform an operation of switching login products, for example, after the user opens the management page corresponding to the first product, the user may want to switch login to the second product, the user may return the multi-product login management page in the current page, select the second product, repeat the login permission verification operation for the second product, and jump to the management page corresponding to the second product after permission verification. It should be noted that, the content of the previous embodiment may be referred to in the right verification process and the opening manner of the management page corresponding to the second product, and details are not described here.
On the basis of the above scheme, the jumping to the management page corresponding to the first product after the permission verification is passed includes: responding to the operation of skipping on the current page, directly acquiring the login token, performing authority verification on the login token, and skipping to a management page corresponding to the first product after the authority verification is passed; or responding to the operation of jumping on a new page, splicing the login token and the website of the new page to generate a secondary login token, performing authority verification on the secondary login token, and jumping to the management page corresponding to the first product after the authority verification is passed.
In one embodiment, there are two implementations of opening the management page corresponding to the first product. One is to jump directly to the management page of the first product on the current page, in which case, the browser directly calls the login token stored before, verifies the login authority of the login token, and after the authority verification is passed, jumps directly to the management page corresponding to the first product on the current page. And the other way is that the browser opens a new page and jumps to the management page of the first product, under the condition, the browser needs to call the login token stored before and splice the login token with the website of the new page to generate a secondary login token, the newly generated secondary login token is subjected to authority verification, and after the authority verification is passed, the management page corresponding to the first product is opened in the new page.
On the basis of the scheme, the method further comprises the following steps: when logging in the multi-product login management page under the condition that the login token is stored, verifying the login duration of the login token; directly jumping to the multi-product login management page in response to confirming that the login token is valid; and in response to the fact that the login token is invalid, re-sending a login request to the server, accessing an application program interface corresponding to the server and acquiring an updated login token returned by the server.
In one embodiment, if the user is not first logging into the multi-product login management page in the browser, that is, the browser has saved the login token. In this case, when the user logs in the multi-product login management page again using the browser, it is necessary to verify the login term of the login token. Under the condition that the login token does not exceed the validity period, the user inputs a login account and a login password, and can directly and successfully log in the multi-product login management page by using the previously stored login token; if the time interval between the login time and the previous login time exceeds the validity period of the login token, the login token stored in the browser before is invalid, and after the user inputs the login account and the login password, the user needs to send a login request to the server again, access the API corresponding to the server, and obtain the updated login token returned by the server. The browser discards the expired login token and saves the updated login token. Other operations are substantially the same as those of the foregoing embodiments of the present application and are not described herein again.
It should be noted that, when the first login is a case where neither the account nor the login password is changed, if the user changes the login account or the login password, it is considered that the multi-product login management page is first logged in.
In the above aspect, the method further includes: the multiple products in the multi-product login management page can be updated, added or deleted.
In one embodiment, if a plurality of products displayed in the multi-product login management page need to be updated, or the number of the products needs to be increased or deleted, corresponding operations can be implemented in the multi-product login management page. For example, a single operation button may be set in the multi-product login management page, and a user may click the operation button to update a product, delete a product, or add a new product; or the multi-product login management page can be set to identify specific operations of the user on the product and trigger operation selection of updating, adding or deleting the product.
It should be noted that the above-listed operations of updating, adding, or deleting products in the multi-product login management page are only examples, and a specific implementation manner thereof is not limited herein.
Example two
Fig. 2 is a flowchart illustrating a multi-product login management method according to a second embodiment of the present application. The embodiment provides a specific embodiment based on the above scheme. Fig. 2 illustrates an example of a multi-product registration management method, taking the management requirement of a certain mobile phone company as an example.
As shown in fig. 2, the multi-product login management page includes a brand mobile phone management system a, an X brand mobile phone inventory management system B, an X brand mobile phone pre-sale management system C, an X brand mobile phone sale management system D, and an X brand mobile phone after-sale management system E. Specifically, the method comprises the following steps:
a staff of a certain company is an after-sale service staff of the company, and the work authority of the company can only access the after-sale management system E of the brand X mobile phone of the company. The employee B is a company brand X mobile phone management responsible person, and the work authority of the employee B can access all related systems of the company related to the brand X mobile phone, such as a brand X mobile phone inventory management system B, a brand X mobile phone pre-sale management system C, a brand X mobile phone sale management system D, a brand X mobile phone after-sale management system E and the like.
A staff member opens a multi-product login management page on a computer of a company, inputs an account number and a login password of the staff member, and after entering the multi-product login management page, a browser accesses an API (application program interface) corresponding to a server and obtains a first login token returned by the server, and the browser stores the first login token in a local storage. The first employee clicks the X brand mobile phone after-sale management system E in the multi-product login management page, after the access authority of the first employee for the X brand mobile phone after-sale management system E is verified, the first employee can successfully log in the page corresponding to the X brand mobile phone after-sale management system E, and the after-sale condition of the X brand mobile phone is checked. If the after-sale management system E of the X brand mobile phone directly skips in the multi-product login management page, the browser directly obtains the stored first login token, verifies the first login token, and skips to the page of the after-sale management system E of the X brand mobile phone after the access authority verification is passed. And if the after-sale management system E of the brand X mobile phone is opened in a new page except the multi-product login management page, splicing the first login token with the website of the new page by the browser to generate a first login token, then verifying the first login token, and after the access right verification is passed, opening the page of the after-sale management system E of the brand X mobile phone in the new page.
And B, the employee A clicks the X brand mobile phone pre-sale management system C in the multi-product login management page, after the access authority of the employee A for the X brand mobile phone pre-sale management system C is verified, the authority verification fails, and the employee A fails to log in the X brand mobile phone pre-sale management system C.
The method comprises the steps that an employee A successfully accesses an after-sale management system E of the brand X mobile phone through a multi-product login management page, when the employee A accesses the after-sale management system E of the brand X mobile phone through the multi-product login management page again, a browser can verify the login validity period of a first login token which is stored before, under the condition that the first login token does not exceed the validity period, identity verification is carried out by using the first login token, and the after-sale management system E of the brand X mobile phone can be successfully accessed after permission verification is passed. And under the condition that the first login token is invalid, the server sends a second service token to the browser, the browser discards the expired first login token, and the latest second login token is saved.
And B, the staff opens a multi-product login management page on a computer of the company, inputs the own account and login password, accesses an API (application programming interface) corresponding to the server after entering the multi-product login management page, acquires a third login token returned by the server, and stores the third login token in a local storage by the browser. And B, the employee clicks the X brand mobile phone after-sale management system E in the multi-product login management page, and after the access authority of the employee B for the X brand mobile phone after-sale management system E is verified, the employee B can successfully log in the page corresponding to the X brand mobile phone after-sale management system E to check the after-sale condition of the X brand mobile phone.
And B, the staff switches from the X brand mobile phone after-sale management system E to the X brand mobile phone inventory management system B, and when the X brand mobile phone after-sale management system E directly skips in the multi-product login management system page, a return button can be clicked on the current X brand after-sale management system E to return the webpage to the previous multi-product login management page, and the X brand mobile phone inventory management system B is selected, so that the staff can successfully log in the X brand mobile phone inventory system B. Or under the condition that the after-sale management page of the X brand mobile phone is a new page relative to the multi-product login management page, the current after-sale management page of the X brand mobile phone is directly switched to the multi-product login management page, and the inventory management system B of the X brand mobile phone is selected from the multi-product login management page, so that the inventory management system B of the X brand mobile phone can be opened in the new page, and login switching among different systems is realized.
The data processing method provided by the embodiment can be used for carrying out login management on multiple products in a unified mode, and verifying the login authorities of the multiple products respectively, so that switching among the multiple products is facilitated, and the working efficiency is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a data processing apparatus according to a third embodiment of the present application. The data processing means may be implemented in software and/or hardware, for example, the data processing means may be configured in a computer device. As shown in fig. 3, the apparatus includes a logintoken obtaining module 310, aproduct selecting module 320, and a login right verifyingmodule 330, wherein:
the logintoken acquisition module 310 is configured to, after logging in a multi-product login management page, access an application program interface corresponding to the server to acquire a login token returned by the server and store the login token;
aproduct selection module 320 configured to select a first product of a plurality of products in the multi-product login management page; wherein the multi-product login management page comprises the plurality of products;
and the loginauthority verification module 330 is configured to perform login authority verification on the first product, and jump to a management page corresponding to the first product after the authority verification is passed.
After logging in a multi-product login management page through a login token acquisition module, accessing an application program interface corresponding to the server to acquire a login token returned by the server and storing the login token; the product selection module selects a first product in a plurality of products in the multi-product login management page; wherein the multi-product login management page comprises the plurality of products; and the login authority verification module performs login authority verification on the first product and skips to a management page corresponding to the first product after the authority verification is passed. The login management can be uniformly carried out on the multiple products, the login authorities of the multiple products are respectively verified, and the working efficiency is improved.
On the basis of the scheme, the multi-product login management device further comprises a product switching module, wherein the product switching module is set to respond to the operation of returning to the multi-product login management page and select a second product, carry out login authority verification on the second product, and jump to a management page corresponding to the second product after the authority verification.
On the basis of the above scheme, the loginright verification module 330 further includes: the first verification unit is used for responding to the operation of jumping on the current page, directly acquiring the login token, performing authority verification on the login token, and jumping to a management page corresponding to the first product after the authority verification is passed; and the second verification unit is used for responding to the operation of jumping on a new page, splicing the login token with the website of the new page to generate a secondary login token, performing authority verification on the secondary login token, and jumping to the management page corresponding to the first product after the authority verification is passed.
On the basis of the scheme, the login authority verification module further comprises a third verification unit which is set to verify the login time limit of the login token; directly jumping to the multi-product login management page in response to confirming that the login token is valid; and in response to the fact that the login token is invalid, re-sending a login request to the server, accessing an application program interface corresponding to the server and acquiring an updated login token returned by the server.
The multi-product login management device provided by the embodiment of the application can execute the multi-product login management method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present application. Fig. 4 is a schematic structural diagram of a computer device provided in a sixth embodiment of the present application. FIG. 4 illustrates a block diagram of an exemplary computer device 412 suitable for use in implementing embodiments of the present application. The computer device 412 shown in FIG. 4 is only one example and should not impose any limitations on the functionality or scope of use of embodiments of the present application.
As shown in FIG. 4, computer device 412 is in the form of a general purpose computing device. Components of computer device 412 may include, but are not limited to: one ormore processors 414, asystem memory 428, and abus 418 that couples the various system components (including thesystem memory 428 and the processors 414).
Bus 418 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, andprocessor 414 or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Thesystem memory 428 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)430 and/orcache memory 432. The computer device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only,storage 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected tobus 418 by one or more data media interfaces.Memory 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 440 having a set (at least one) ofprogram modules 442 may be stored, for instance, inmemory 428,such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Theprogram modules 442 generally perform the functions and/or methods of the embodiments described herein.
The computer device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device,display 424, etc.), with one or more devices that enable a user to interact with the computer device 412, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 412 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 422. Also, computer device 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) throughnetwork adapter 420. As shown,network adapter 420 communicates with the other modules of computer device 412 overbus 418. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Theprocessor 414 executes programs stored in thesystem memory 428 to execute various functional applications and data processing, for example, to implement the multi-product login management method provided by the embodiment of the present application, the method includes:
after logging in a multi-product login management page, accessing an application program interface corresponding to the server to obtain a login token returned by the server and storing the login token;
selecting a first product of a plurality of products in the multi-product login management page; wherein the multi-product login management page comprises the plurality of products;
and performing login authority verification on the first product, and jumping to a management page corresponding to the first product after the authority verification is passed.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the data processing method provided in any embodiment of the present application.
EXAMPLE five
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the multi-product login management method provided in the embodiment of the present application, and the method includes:
after logging in a multi-product login management page, accessing an application program interface corresponding to the server to obtain a login token returned by the server and storing the login token;
selecting a first product of a plurality of products in the multi-product login management page; wherein the multi-product login management page comprises the plurality of products;
and performing login authority verification on the first product, and jumping to a management page corresponding to the first product after the authority verification is passed.
Of course, the computer program stored on the computer-readable storage medium provided in the embodiments of the present application is not limited to the above method operations, and may also perform related operations of the data processing method provided in any embodiment of the present application.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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.
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, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments illustrated herein, and that various obvious changes, rearrangements and substitutions may be made therein by those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.