CN111970286A - User login method and device and web server - Google Patents

User login method and device and web server Download PDF

Info

Publication number
CN111970286A
CN111970286A CN202010848599.XA CN202010848599A CN111970286A CN 111970286 A CN111970286 A CN 111970286A CN 202010848599 A CN202010848599 A CN 202010848599A CN 111970286 A CN111970286 A CN 111970286A
Authority
CN
China
Prior art keywords
tenant
user
information
data source
login
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010848599.XA
Other languages
Chinese (zh)
Inventor
杨志鹏
马文静
李鑫
孙涛
靳兆强
周海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Forever Technology Co Ltd
Original Assignee
Beijing Forever 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 Forever Technology Co Ltd filed Critical Beijing Forever Technology Co Ltd
Priority to CN202010848599.XA priority Critical patent/CN111970286A/en
Publication of CN111970286A publication Critical patent/CN111970286A/en
Pending legal-status Critical Current

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention provides a user login method, a device and a web server, wherein the web server is provided with data sources corresponding to different tenant identifications in advance, user identity reference information of the corresponding tenant identification is stored in the data sources in advance, and when a tenant logs in, after the user login information is acquired, a target data source corresponding to the tenant identification in the user login information is searched, the user identity reference information is acquired from the target data source and the logged-in tenant is checked.

Description

User login method and device and web server
Technical Field
The invention relates to the field of multi-tenant, in particular to a user login method, a user login device and a web server.
Background
Multi-tenant technology (multi-tenant technology), or multi-tenancy technology, is a software architecture technology that explores and implements how to share the same system or program components in a multi-user environment and still ensure data isolation between users. By adopting the multi-tenant technology, on one hand, repeated software development and deployment work is not required, and the code writing cost is saved. On the other hand, when any other unit or person wants to use the system, namely renting and using, the background server only needs to add one tenant.
When a multi-tenant technology is used for tenant login, identity verification needs to be carried out on the tenant, the server generally sends obtained login information of the tenant to a third-party verification platform, the third-party verification platform carries out identity verification on the tenant, but the leakage of the identity information of the tenant is easily caused by introducing the third-party verification platform, and the safety is low.
Disclosure of Invention
In view of the above, the invention provides a user login method, a user login device and a web server, so as to solve the problems that the identity information of a tenant is easily leaked and the security is low when a third-party verification platform verifies the identity of the tenant.
In order to solve the technical problems, the invention adopts the following technical scheme:
a user login method is applied to a web server, the web server is preset with data sources corresponding to different tenant identifications, and user identity reference information and user operation data of the corresponding tenant identification are stored in the data sources in advance; the user login method comprises the following steps:
acquiring user login information; the user login information comprises user identity information and tenant identification;
determining a target data source corresponding to the tenant identification, and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and under the condition that the user identity information is matched with the user identity reference information, switching the data source used by the web server to the target data source, and performing page rendering based on the user operation data stored in the target data source.
Optionally, under the condition that the login addresses corresponding to different users are different, obtaining login information of the user includes:
and acquiring user identity information input by a user on a page of a corresponding login address, and determining the login address as the tenant identification.
Optionally, determining a target data source corresponding to the tenant identity includes:
determining a tenant name corresponding to a login address according to a preset corresponding relation between the login address and the tenant name;
and determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
Optionally, under the condition that the login addresses corresponding to different users are the same, acquiring login information of the user includes:
and acquiring user identity information and tenant identification input by a user on a page corresponding to the login address.
Optionally, determining a target data source corresponding to the tenant identity includes:
and determining the tenant identification as a tenant name, and determining a target data source corresponding to the tenant name according to a preset corresponding relationship between the tenant name and the data source.
Optionally, the method further comprises:
acquiring new tenant information input in a preset tenant adding interface; the new tenant information comprises data source information and user information; the user information comprises a tenant identification and user identity reference information;
under the condition that the data source information can be connected to the corresponding data source, adding the data source corresponding to the data source information into a data source connection pool;
and creating a tenant account corresponding to the user information, and establishing a corresponding relation between the user information and the data source.
A user login device is applied to a web server, the web server is provided with data sources corresponding to different tenant identifications in advance, and user identity reference information and user operation data of the corresponding tenant identification are stored in the data sources in advance; the user login device comprises:
the information acquisition module is used for acquiring user login information; the user login information comprises user identity information and tenant identification;
the information determining module is used for determining a target data source corresponding to the tenant identification and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and the user login module is used for switching the data source used by the web server to the target data source under the condition that the user identity information is matched with the user identity reference information, and performing page rendering based on the user operation data stored in the target data source.
Optionally, the information obtaining module is specifically configured to, in a case that login addresses corresponding to different users are different:
and acquiring user identity information input by a user on a page of a corresponding login address, and determining the login address as the tenant identification.
Optionally, the information determining module is specifically configured to:
determining a tenant name corresponding to a login address according to a preset corresponding relation between the login address and the tenant name;
and determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
A web server is provided with data sources corresponding to different tenant identifications in advance, and user identity reference information and user operation data of the corresponding tenant identifications are stored in the data sources in advance; the web server includes: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring user login information; the user login information comprises user identity information and tenant identification;
determining a target data source corresponding to the tenant identification, and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and under the condition that the user identity information is matched with the user identity reference information, switching the data source used by the web server to the target data source, and performing page rendering based on the user operation data stored in the target data source.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a user login method, a device and a web server, wherein the web server is provided with data sources corresponding to different tenant identifications in advance, user identity reference information of the corresponding tenant identification is stored in the data sources in advance, and when a tenant logs in, after the user login information is acquired, a target data source corresponding to the tenant identification in the user login information is searched, the user identity reference information is acquired from the target data source and the logged-in tenant is checked.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for a user to log in according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for user login according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a user login device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When a multi-tenant technology is used for tenant login, identity verification needs to be carried out on the tenant, the server generally sends obtained login information of the tenant to a third-party verification platform, the third-party verification platform carries out identity verification on the tenant, but the leakage of the identity information of the tenant is easily caused by introducing the third-party verification platform, and the safety is low.
In order to solve the problems that the introduction of a third-party verification platform easily causes leakage of tenant identity information and the safety is low, the invention finds that a user identity verification function can be integrated in a web server for realizing a multi-tenant technology, so that the tenant login can be realized only by using the web server.
Specifically, the web server is provided with data sources corresponding to different tenant identifications in advance, user identity reference information of the corresponding tenant identification is stored in the data sources in advance, when a tenant logs in, after the user login information is obtained, a target data source corresponding to the tenant identification in the user login information is searched, the user identity reference information is obtained from the target data source, and the logged-in tenant is verified, namely, the verification of the tenant identity can be achieved only through the web server, the web server does not depend on a third-party verification platform, the possibility of leakage of the tenant identity information is low, and the safety is high.
On the basis of the above embodiments, an embodiment of the present invention provides a user login method, and with reference to fig. 1, the user login method includes:
and S11, obtaining user login information.
The user login information comprises user identity information and tenant identification.
In practical application, a user logs in a web server in two ways, one way is that different tenants log in by using different login addresses, that is, different login addresses are set for different tenants respectively, if which user needs to log in, the user logs in by using the corresponding login address, after the web server receives a login instruction of the user, the login instruction carries the login address, a page corresponding to the login address is rendered, and an input user identity information page is rendered, wherein the page can comprise an account and a password, the account and the password are input on the page by the user, and the login button is clicked, so that the web server can obtain the account and the password.
In this embodiment, the corresponding relationship between the login address and the tenant name, and the corresponding relationship between the tenant name and the target data source are preset in the web server, for example, the login address is http: com, the tenant name is tenant A, and the corresponding target data source is DB 1.
In the embodiment of the invention, data sources used by a plurality of tenants are preset, the types of the data sources of different data sources may be the same or different, but the names of the data sources are definitely different. Such as: data source one ip 192.168.1.1port 3306dbName testDb, data source two ip 192.168.1.2port 3306dbName testDb 2. Therefore, the invention can ensure that the independent data source is adopted, one tenant is used as the data source, the user data isolation level is highest, the safety is best, if the fault occurs, the recovery data is simpler, but the data sharing is low, and the cost is higher.
User identity reference information and user operation data of a corresponding tenant identity are stored in each data source, wherein the user identity reference information can be a real account number, a real password and the like corresponding to the tenant, and is used for verifying the account number and the real password input by the user when the user logs in. The user operation data may be history data, setting data, etc. of the user, for example, which web pages the user has browsed for the duration of time, which contents have been set, etc.
After the login address is obtained, according to the preset corresponding relation between the login address and the tenant name, the tenant name corresponding to the login address is determined, and according to the preset corresponding relation between the tenant name and the data source, the target data source corresponding to the tenant name is determined, so that the corresponding user identity reference information can be obtained from the target data source.
Another implementation manner of logging in the web server by a user is that different tenants log in by using the same login address, that is, the same login address is set for different tenants, all tenants log in accounts through the same login address, after logging in the login address, a page of logging in is displayed on the page, except that an account and a password can be input as in the above-mentioned scheme, a selection box for selecting a tenant name in a pull-down bar manner is added, the user selects a tenant name of the user in a pull-down selection manner, then a login button is clicked, the web server determines the input account and password as user identity information, and determines the selected tenant name as a tenant identification, that is, the tenant identification is determined as the tenant name, and the tenant identification is the same as the tenant name.
And then determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
As can be seen from the above, the way in which the tenant accesses the web server provides two ways:
(1) different tenants access different links, wherein the link address is an access address generated when tenant information is configured;
(2) all users use the uniform login address, and login is performed after the tenants to which the users belong are selected during login.
S12, determining a target data source corresponding to the tenant identification, and acquiring user identity reference information corresponding to the tenant identification from the target data source.
The specific implementation process of this step has been explained in the above embodiments, please refer to the above corresponding description.
S13, under the condition that the user identity information is matched with the user identity reference information, switching the data source used by the web server to the target data source, and performing page rendering based on the user operation data stored by the target data source.
And after the user identity information and the user identity reference information are acquired, verifying whether the two are matched, specifically, verifying whether the two are the same, if so, determining that the two are matched, namely, if the account and the password input by the user on the page corresponding to the login address are correct, and allowing the tenant to login.
Before an interface for logging in of the tenant is rendered, a web server is required to dynamically switch a data source used by the web server to a target data source, and page rendering is performed according to user operation data stored in the target data source, so that after the tenant logs in, the content of the tenant is displayed, such as displaying a chat record, chat setting and the like of the tenant, and the correctness of the connected data source is ensured.
In addition, it should be noted that, when the web server is started each time, different tenants correspond to different data sources, so as to avoid the problem that the user waiting time is long due to the fact that the initialization operation of the corresponding data source is performed when the user accesses, the initialization operation of all the data sources is performed when the web server is started, so that the waiting time can be reduced when the user accesses, and the user experience is improved.
The data initialization operation in this embodiment refers to:
and inquiring data source setting information corresponding to each tenant from the tenant information table, encapsulating the information into a DruidDataSource object, and adding the DruidDataSource object into the customized dynamic RouterDataSource.
In the embodiment, the web server is provided with the data sources corresponding to different tenant identifications in advance, the user identity reference information of the corresponding tenant identification is stored in the data source in advance, and when a tenant logs in, after the user login information is obtained, the target data source corresponding to the tenant identification in the user login information is searched, the user identity reference information is obtained from the target data source, and the logged tenant is checked.
In the above embodiment, the process of how to verify and how to switch the data source when the tenant logs in is described, and in another embodiment of the present invention, real-time creation and modification of the tenant are also supported, specifically, referring to fig. 2, the user login method may further include:
and S21, acquiring new tenant information input in the preset tenant adding interface.
In practical application, an administrator of the web server has the right to add and modify tenants, and other personnel can perform corresponding operations only when giving corresponding rights.
When a tenant is newly added, setting new tenant information on a preset tenant adding interface, wherein the new tenant information comprises data source information and user information; the user information comprises a tenant identification and user identity reference information. The tenant identification can be the login address, and can be an independent login address or a uniform login address. The user identity reference information can be a login account number, a password and the like, and in addition, information such as contact person information, effective starting and stopping time, administrator allocation, resource allocation and the like can be set.
And S22, adding the data source corresponding to the data source information into the data source connection pool under the condition that the data source information can be connected to the corresponding data source.
After the information setting is completed, the data source information is allowed to be stored only after the data source information is successfully verified, and after the data source information is successfully stored, the data source information is initialized, specifically, the data source information is added into a data source connection pool for program calling and used for subsequent dynamic switching of data sources.
Wherein, the verification process is as follows:
and according to the input data source information, such as login address, name, account and password, data source connection is carried out through Java codes at the background, successful connection represents that verification is passed, and otherwise, failure is caused.
S23, creating a tenant account corresponding to the user information, and establishing a corresponding relation between the user information and the data source.
In practical application, if the data source passes verification, it is indicated that the new tenant meets the requirements, creation may be allowed, at this time, the tenant account corresponding to the user information stores the user information in the data source, and a corresponding relationship between the user information and the data source is established, so as to ensure that, when the subsequent tenant logs in, the tenant log-in verification can be performed through the user information stored in the data source.
In the embodiment, the tenants are added into the web server, so that the same web server can be ensured to support the login of different tenants.
In addition, another embodiment of the present invention further supports tenant modification operation, specifically, when modifying a tenant, if a tenant management source modifies data source information, this needs to be checked, and corresponding data source information is updated. To ensure that the data source to which the tenant is connected is up-to-date.
Optionally, on the basis of the embodiment of the user login method, another embodiment of the present invention provides a user login apparatus, which is applied to a web server, where the web server is preset with data sources corresponding to different tenant identifiers, and the data sources are pre-stored with user identity reference information and user operation data of the corresponding tenant identifiers; the user login device comprises:
the information acquisition module 11 is used for acquiring user login information; the user login information comprises user identity information and tenant identification;
an information determining module 12, configured to determine a target data source corresponding to the tenant identifier, and obtain user identity reference information corresponding to the tenant identifier from the target data source;
and the user login module 13 is configured to switch the data source used by the web server to the target data source and perform page rendering based on the user operation data stored in the target data source when the user identity information is matched with the user identity reference information.
Further, under the condition that the login addresses corresponding to different users are different, the information acquisition module is specifically configured to:
and acquiring user identity information input by a user on a page of a corresponding login address, and determining the login address as the tenant identification.
Further, the information determination module is specifically configured to:
determining a tenant name corresponding to a login address according to a preset corresponding relation between the login address and the tenant name;
and determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
Further, under the condition that the corresponding login addresses of different users are the same, the information acquisition module is specifically configured to:
and acquiring user identity information and tenant identification input by a user on a page corresponding to the login address.
Further, the information determination module is specifically configured to:
and determining the tenant identification as a tenant name, and determining a target data source corresponding to the tenant name according to a preset corresponding relationship between the tenant name and the data source.
Further, the system further comprises a tenant creating module, specifically configured to:
acquiring new tenant information input in a preset tenant adding interface; the new tenant information comprises data source information and user information; the user information comprises a tenant identification and user identity reference information; under the condition that the data source information can be connected to the corresponding data source, adding the data source corresponding to the data source information into a data source connection pool; and creating a tenant account corresponding to the user information, and establishing a corresponding relation between the user information and the data source.
In the embodiment, the web server is provided with the data sources corresponding to different tenant identifications in advance, the user identity reference information of the corresponding tenant identification is stored in the data source in advance, and when a tenant logs in, after the user login information is obtained, the target data source corresponding to the tenant identification in the user login information is searched, the user identity reference information is obtained from the target data source, and the logged tenant is checked.
It should be noted that, for the working process of each module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the embodiments of the user login method and apparatus, another embodiment of the present invention provides a web server, where the web server is preset with data sources corresponding to different tenant identities, and the data sources are pre-stored with user identity reference information and user operation data of the tenant identities corresponding to the data sources; the web server includes: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring user login information; the user login information comprises user identity information and tenant identification;
determining a target data source corresponding to the tenant identification, and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and under the condition that the user identity information is matched with the user identity reference information, switching the data source used by the web server to the target data source, and performing page rendering based on the user operation data stored in the target data source.
Further, under the condition that the login addresses corresponding to different users are different, acquiring user login information, comprising:
and acquiring user identity information input by a user on a page of a corresponding login address, and determining the login address as the tenant identification.
Further, determining a target data source corresponding to the tenant identity includes:
determining a tenant name corresponding to a login address according to a preset corresponding relation between the login address and the tenant name;
and determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
Further, under the condition that the corresponding login addresses of different users are the same, acquiring user login information, comprising:
and acquiring user identity information and tenant identification input by a user on a page corresponding to the login address.
Further, determining a target data source corresponding to the tenant identity includes:
and determining the tenant identification as a tenant name, and determining a target data source corresponding to the tenant name according to a preset corresponding relationship between the tenant name and the data source.
Further, still include:
acquiring new tenant information input in a preset tenant adding interface; the new tenant information comprises data source information and user information; the user information comprises a tenant identification and user identity reference information;
under the condition that the data source information can be connected to the corresponding data source, adding the data source corresponding to the data source information into a data source connection pool;
and creating a tenant account corresponding to the user information, and establishing a corresponding relation between the user information and the data source.
In the embodiment, the web server is provided with the data sources corresponding to different tenant identifications in advance, the user identity reference information of the corresponding tenant identification is stored in the data source in advance, and when a tenant logs in, after the user login information is obtained, the target data source corresponding to the tenant identification in the user login information is searched, the user identity reference information is obtained from the target data source, and the logged tenant is checked.
It should be noted that, for the specific implementation process of each step in this embodiment, please refer to the corresponding description in the foregoing embodiment, which is not described herein again.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A user login method is characterized in that the method is applied to a web server, the web server is provided with data sources corresponding to different tenant identifications in advance, and user identity reference information and user operation data of the corresponding tenant identification are stored in the data sources in advance; the user login method comprises the following steps:
acquiring user login information; the user login information comprises user identity information and tenant identification;
determining a target data source corresponding to the tenant identification, and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and under the condition that the user identity information is matched with the user identity reference information, switching the data source used by the web server to the target data source, and performing page rendering based on the user operation data stored in the target data source.
2. The user login method according to claim 1, wherein obtaining user login information under the condition that login addresses corresponding to different users are different comprises:
and acquiring user identity information input by a user on a page of a corresponding login address, and determining the login address as the tenant identification.
3. The user login method according to claim 2, wherein determining the target data source corresponding to the tenant identity comprises:
determining a tenant name corresponding to a login address according to a preset corresponding relation between the login address and the tenant name;
and determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
4. The user login method according to claim 1, wherein obtaining user login information under the condition that login addresses corresponding to different users are the same comprises:
and acquiring user identity information and tenant identification input by a user on a page corresponding to the login address.
5. The user login method according to claim 4, wherein determining the target data source corresponding to the tenant identity comprises:
and determining the tenant identification as a tenant name, and determining a target data source corresponding to the tenant name according to a preset corresponding relationship between the tenant name and the data source.
6. The user login method according to claim 1, further comprising:
acquiring new tenant information input in a preset tenant adding interface; the new tenant information comprises data source information and user information; the user information comprises a tenant identification and user identity reference information;
under the condition that the data source information can be connected to the corresponding data source, adding the data source corresponding to the data source information into a data source connection pool;
and creating a tenant account corresponding to the user information, and establishing a corresponding relation between the user information and the data source.
7. A user login device is characterized by being applied to a web server, wherein the web server is preset with data sources corresponding to different tenant identifications, and user identity reference information and user operation data of the corresponding tenant identification are prestored in the data sources; the user login device comprises:
the information acquisition module is used for acquiring user login information; the user login information comprises user identity information and tenant identification;
the information determining module is used for determining a target data source corresponding to the tenant identification and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and the user login module is used for switching the data source used by the web server to the target data source under the condition that the user identity information is matched with the user identity reference information, and performing page rendering based on the user operation data stored in the target data source.
8. The user login device according to claim 7, wherein the information obtaining module is specifically configured to, in a case that login addresses corresponding to different users are different:
and acquiring user identity information input by a user on a page of a corresponding login address, and determining the login address as the tenant identification.
9. The user login device of claim 8, wherein the information determination module is specifically configured to:
determining a tenant name corresponding to a login address according to a preset corresponding relation between the login address and the tenant name;
and determining a target data source corresponding to the tenant name according to the preset corresponding relation between the tenant name and the data source.
10. A web server is characterized in that the web server is provided with data sources corresponding to different tenant identifications in advance, and user identity reference information and user operation data of the corresponding tenant identification are stored in the data sources in advance; the web server includes: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
acquiring user login information; the user login information comprises user identity information and tenant identification;
determining a target data source corresponding to the tenant identification, and acquiring user identity reference information corresponding to the tenant identification from the target data source;
and under the condition that the user identity information is matched with the user identity reference information, switching the data source used by the web server to the target data source, and performing page rendering based on the user operation data stored in the target data source.
CN202010848599.XA 2020-08-21 2020-08-21 User login method and device and web server Pending CN111970286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010848599.XA CN111970286A (en) 2020-08-21 2020-08-21 User login method and device and web server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010848599.XA CN111970286A (en) 2020-08-21 2020-08-21 User login method and device and web server

Publications (1)

Publication Number Publication Date
CN111970286A true CN111970286A (en) 2020-11-20

Family

ID=73389917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010848599.XA Pending CN111970286A (en) 2020-08-21 2020-08-21 User login method and device and web server

Country Status (1)

Country Link
CN (1) CN111970286A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114387085A (en) * 2022-01-12 2022-04-22 见知数据科技(上海)有限公司 Method and device for processing pipeline data, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777047A (en) * 2009-01-08 2010-07-14 国际商业机器公司 System, equipment and method for accessing database under multiple-tenant environment
US20140289391A1 (en) * 2013-03-19 2014-09-25 Cognizant Technology Solutions India Pvt. Ltd. Framework for facilitating implementation of multi-tenant saas architecture
CN104270349A (en) * 2014-09-17 2015-01-07 广州中国科学院软件应用技术研究所 Isolation method and device for cloud computing multi-tenant application
CN105824625A (en) * 2016-03-14 2016-08-03 北京中电普华信息技术有限公司 Business application construction device and method based on cloud environment
CN111221655A (en) * 2020-01-08 2020-06-02 山东汇贸电子口岸有限公司 Method and device for managing resources of OpenStack platform
CN111541546A (en) * 2020-04-24 2020-08-14 前海乔希(深圳)教育科技有限公司 Multi-platform login method, device, equipment and readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777047A (en) * 2009-01-08 2010-07-14 国际商业机器公司 System, equipment and method for accessing database under multiple-tenant environment
US20140289391A1 (en) * 2013-03-19 2014-09-25 Cognizant Technology Solutions India Pvt. Ltd. Framework for facilitating implementation of multi-tenant saas architecture
CN104270349A (en) * 2014-09-17 2015-01-07 广州中国科学院软件应用技术研究所 Isolation method and device for cloud computing multi-tenant application
CN105824625A (en) * 2016-03-14 2016-08-03 北京中电普华信息技术有限公司 Business application construction device and method based on cloud environment
CN111221655A (en) * 2020-01-08 2020-06-02 山东汇贸电子口岸有限公司 Method and device for managing resources of OpenStack platform
CN111541546A (en) * 2020-04-24 2020-08-14 前海乔希(深圳)教育科技有限公司 Multi-platform login method, device, equipment and readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RICKY_FUNG: ""Spring 动态数据源路由(Dynamic DataSource Routing)"", 《CSDN博客HTTPS://BLOG.CSDN.NET/TOP_CODE/ARTICLE/DETAILS/52851439》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114387085A (en) * 2022-01-12 2022-04-22 见知数据科技(上海)有限公司 Method and device for processing pipeline data, computer equipment and storage medium
CN114387085B (en) * 2022-01-12 2024-04-16 见知数据科技(上海)有限公司 Method, device, computer equipment and storage medium for processing stream data

Similar Documents

Publication Publication Date Title
CN104580074B (en) The login method of client application and its corresponding server
CN107948203A (en) A kind of container login method, application server, system and storage medium
CN112492028B (en) Cloud desktop login method and device, electronic equipment and storage medium
CN107104923B (en) Account binding and service processing method and device
CN110968760A (en) Webpage data crawling method and device, and webpage login method and device
EP3468128B1 (en) Method and device for preventing server from being attacked
CN108255708A (en) Method, apparatus, storage medium and the equipment of production file are accessed in test environment
CN108289080B (en) Method, device and system for accessing file system
WO2016090328A1 (en) Processing unstructured messages
CN111970286A (en) User login method and device and web server
CN107239475B (en) File calling method and device
CN104426834A (en) Webpage requesting method, client, server and system
CN110968560A (en) Log collector configuration method, device and system
CN112559352A (en) Interface test method, device, equipment and storage medium
CN104518871A (en) Network platform and method for performing self-service authentication on mobile storage equipment
CN109542401B (en) Web development method and device, storage medium and processor
CN115604103A (en) Configuration method and device of cloud computing system, storage medium and electronic equipment
CN109302446B (en) Cross-platform access method and device, electronic equipment and storage medium
CN111049671A (en) System integration method and device
CN112580018A (en) User management mode switching method and device
CN111683092B (en) Workflow submitting method, device, equipment and storage medium
CN111639020B (en) Program bug reproduction method, system, device, electronic equipment and storage medium thereof
CN110955847B (en) Information processing method, device, storage medium and processor
CN117098134B (en) Security control method, terminal, and non-transitory computer-readable storage medium
CN112583777B (en) Method and device for realizing user login

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201120

RJ01 Rejection of invention patent application after publication