A method and system for rapid authentication between multiple services in a coal mine
Through the method and system of rapid authentication between multiple services of coal mines, the collaborative work of the certification center and user terminals is used to solve the problem of users frequently logging into different systems in coal mine enterprises, and fast authentication and single sign-in are achieved, which improves operational efficiency and security.
Patent Information
- Application Number
- CN202411666877.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Due to the increase in the number of systems in coal mine enterprises, users need to frequently log in to different systems, resulting in duplicate authentication and management complexity caused by cumbersome operations, safety risks, and system independence.
It provides a method and system for rapid authentication between multiple service rooms of coal mines. User registration, login and token management are realized through the authentication center. The user terminal carries the authentication token to access multiple service rooms. The authentication center is responsible for the generation, verification and refresh of tokens.
It realizes fast authentication and single sign-on between multi-service systems, reduces user login frequency, improves operational efficiency and security, and simplifies user management and permission control.
Smart Images

Figure CN119155129B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a method and system for rapid authentication between multiple services in a coal mine. Background Art
[0002] With the acceleration of the informatization process of the coal mining industry, various information systems and digital services have been widely used in coal mining enterprises. These systems involve production management, safety monitoring, equipment management, personnel positioning and other aspects. Through these systems, enterprises can monitor and optimize the production process, improve production safety and operational efficiency. However, with the increase in the number of systems, enterprise users need to frequently log in between different systems for operation and management, which brings a large operational burden to users, especially in emergency situations, where frequent authentication processes affect work efficiency and response speed.
[0003] At present, the common authentication method of coal mining enterprises mainly adopts the traditional user name and password authentication mode. Each system manages the user's authentication information separately, and the user needs to enter the user name and password for each system to access the relevant functions. This authentication method has the following defects:
[0004] Cumbersome operation: When using multiple systems, users need to log in repeatedly, which increases the complexity and time cost of the operation. Especially in scenarios where frequent system switching is required, the user experience is poor. Security risks: In the traditional username and password authentication mode, each system manages user passwords independently, which not only increases the management complexity, but also easily leads to the risk of password leakage. Users often set the same password for multiple systems. Once a password leak occurs in a system, the security of other systems will also be threatened. In addition, frequent password input increases the possibility of exposure to security risks such as keyboard logging attacks. Repeated authentication caused by system independence: There is usually no unified authentication mechanism between systems. Users need to log in multiple times when accessing different systems. This decentralized authentication method is particularly disadvantageous in emergency situations. When handling emergency tasks, users need to spend more time on repeated authentication operations, thereby reducing overall work efficiency. Management complexity: Since each system independently maintains user identity information, the company's operations in user authority management and authentication information update become complicated and prone to errors. Especially in the case of frequent personnel changes, administrators need to add, delete or modify user permissions for each system, which invisibly increases the workload of operation and maintenance and the risk of errors.
[0005] Although some modern authentication schemes such as Kerberos can achieve centralized authentication among multiple systems, their deployment and maintenance process is complex, especially in heterogeneous network environments, requiring additional configuration and debugging. This not only increases the cost and difficulty of implementation, but also has an adverse impact on system performance and cannot adapt well to the complex network environment in coal mining enterprises.
[0006] Therefore, there is an urgent need for a method and system for rapid authentication between multiple services in a coal mine. Summary of the invention
[0007] The present invention provides a method and system for rapid authentication between multiple services in a coal mine, so as to solve the above problems existing in the prior art.
[0008] In order to achieve the above object, the present invention provides the following technical solutions:
[0009] A method for rapid authentication between multiple services in a coal mine, comprising:
[0010] S101: A new user accesses the registration interface of the authentication center through a user terminal, fills in and submits the registration information, and the authentication center verifies the registration information to complete the user registration;
[0011] S102: The user enters login information on the login interface of the authentication center. The login request is transmitted to the service provider through an encrypted protocol. The service provider forwards the login request to the authentication center for verification. After the verification is successful, an authentication token is generated. The authentication token is returned to the user terminal via the service provider.
[0012] S103: After receiving the authentication token, the user terminal stores the authentication token locally;
[0013] S104: When a user accesses a multi-service room in a coal mine, the user terminal carries an authentication token to initiate an access request, and the service provider verifies the validity of the token. After the verification is passed, the user is allowed to access the corresponding service room;
[0014] S105: When the authentication token is close to expiration, the user terminal automatically calls the token refresh interface of the authentication center to obtain a new authentication token to ensure the user's continuous login status and authentication authority.
[0015] Wherein, step S101 includes:
[0016] S1011: The user accesses the registration interface of the authentication center on the user terminal and submits the registration information, which includes the user name, password, email address and mobile phone number;
[0017] S1012: The user management module of the authentication center receives the registration information and performs a uniqueness check on the filled-in user name to ensure that the submitted user name has not been registered by others. If the user name already exists, a prompt message is sent to the user terminal to require the user to select another user name;
[0018] S1013: The user management module verifies the integrity of the submitted information to ensure that all required items have been filled in and that the format of the input information complies with the predetermined standards;
[0019] S1014: If the information is complete and in a legal format, the authentication center will continue to verify the legitimacy, including verifying the mobile phone number, by sending a verification code to the mobile phone provided by the user for confirmation;
[0020] S1015: After the verification is passed, the user management module stores the user information in the user database and generates a unique user identifier.
[0021] Wherein, step S102 includes:
[0022] Based on the login information, the login request is sent to the coal mine multi-service room through an encrypted protocol;
[0023] After receiving the login request, the coal mine multi-service room forwards the login request to the authentication center for user identity authentication;
[0024] The authentication center verifies the login information and generates an authentication token after verification;
[0025] The coal mine multi-service room receives the authentication token generated by the authentication center and returns the authentication token to the user terminal via the access system;
[0026] The user terminal carries the authentication token in subsequent requests;
[0027] The coal mine multi-service room verifies the authentication token through the verification interface of the authentication center, including verifying the signature and validity of the authentication token;
[0028] If the authentication token is verified, the coal mine multi-service room extracts the user identity information and permission information from the authentication token and performs access control to ensure that the user can access information within the scope of the permission.
[0029] After verification, the user is allowed to access the corresponding service room, including:
[0030] Obtain access request data between multiple services in the coal mine, extract user identity information from the authentication token carried by the user terminal, and the access request data includes user identity data and access service type;
[0031] According to the user identity data and access service type, the access request data is processed in layers to obtain verification data, including:
[0032] Obtain user permission information from user identity data;
[0033] Get the service type associated with each user's permission information as the data to be verified;
[0034] An access authorization result is generated based on the verification data, and the access authorization result is input into the coal mine multi-service room, allowing users to access corresponding service data and functional modules.
[0035] Among them, obtaining a new authentication token includes:
[0036] Receive an authentication token status detection request sent by a user terminal, and obtain the first expiration time information carried in the authentication token; wherein the authentication token is generated by an authentication center after user identity authentication and sent to the user terminal, and in the authentication path corresponding to the authentication token, the user terminal is a terminal device that carries authentication information when accessing a target resource;
[0037] When the remaining valid time represented by the first expiration time information is less than a preset threshold, the user terminal is automatically triggered to call the token refresh interface of the authentication center and send a refresh request carrying the old token to obtain a new authentication token; wherein the preset threshold is used to indicate the time point when the authentication token is close to expiration;
[0038] After successfully obtaining a new authentication token, update the old token saved on the user terminal and ensure the user's continuous login status and authentication authority in the authentication center and the target resource access path;
[0039] An access request carrying a new authentication token is sent to the server corresponding to the target resource, and when an access response of the target resource is obtained, the new authentication token is used for subsequent authentication processes to maintain continuous access rights of the user terminal.
[0040] Among them, after the verification is passed, the authentication token is generated, including:
[0041] Based on the user identity authentication requirements, determine the user information included in the login request;
[0042] Obtain the user database corresponding to the user information;
[0043] The user information is matched and verified with the data in the user database. If the match is successful, an authentication token is generated;
[0044] The user information is matched with the data in the preset verification database. If the match is successful, an authentication token is generated, including:
[0045] The user name in the verification information is searched in the verification database. If the match fails, the login failure result is output; if the match succeeds, the corresponding password information in the database is obtained;
[0046] Match the password entered by the user with the password information in the database. If the match is successful, generate an authentication token in the JWT format.
[0047] After the authentication token is generated, the token contains the user's identity information and signature, and the signature is encrypted based on the private key of the authentication center;
[0048] Return the generated authentication token to the client as a credential for subsequent access to system resources;
[0049] If the username and password do not match, a login failure result is output and the login request is rejected.
[0050] Wherein, based on the user identity authentication requirement, the user information contained in the login request is determined, including:
[0051] Parse the login request to obtain the username and password entered by the user;
[0052] Pre-process the username and password to obtain cleaned user information;
[0053] Use the user name and password as the information to be verified.
[0054] Among them, obtaining user authority information from user identity data includes:
[0055] Parse the user's identity data to obtain a permission information set related to the identity data; the permission information set includes the user's role, permission level, and accessible information list;
[0056] Generate access authorization results based on the data to be verified, including:
[0057] Match the user permission information with each type in the service room type to determine the user's authorization level for the service room type;
[0058] If the user permission information meets the preset access conditions, an access authorization result is generated;
[0059] If the user permission information does not meet the access conditions, an access authorization result of authorization denial is generated.
[0060] Among them, a system for rapid authentication between multiple services in a coal mine includes:
[0061] The registration unit is used for new users to access the registration interface of the authentication center through the user terminal, fill in and submit the registration information, and the authentication center verifies the registration information to complete the user registration;
[0062] Login unit, used for users to input login information on the login interface of the authentication center. The login request is transmitted to the service provider through an encrypted protocol. The service provider forwards the login request to the authentication center for verification. After the verification is passed, an authentication token is generated. The authentication token is returned to the user terminal via the service provider;
[0063] The token storage unit is used to store the authentication token locally after the user terminal receives the authentication token;
[0064] The service access unit is used when a user accesses multiple service rooms in a coal mine. The user terminal carries the authentication token to initiate an access request. The service provider verifies the validity of the token. After the verification is passed, the user is allowed to access the corresponding service room.
[0065] The token refresh unit is used to automatically call the token refresh interface of the authentication center when the authentication token is about to expire, and obtain a new authentication token to ensure the user's continuous login status and authentication authority.
[0066] The login unit includes:
[0067] Based on the login information, the login request is sent to the coal mine multi-service room through an encrypted protocol;
[0068] After receiving the login request, the coal mine multi-service room forwards the login request to the authentication center for user identity authentication;
[0069] The authentication center verifies the login information and generates an authentication token after verification;
[0070] The coal mine multi-service room receives the authentication token generated by the authentication center and returns the authentication token to the user terminal via the access system;
[0071] The user terminal carries the authentication token in subsequent requests;
[0072] The coal mine multi-service room verifies the authentication token through the verification interface of the authentication center, including verifying the signature and validity of the authentication token;
[0073] If the authentication token is verified, the coal mine multi-service room extracts the user identity information and permission information from the authentication token and performs access control to ensure that the user can access information within the scope of the permission.
[0074] Compared with the prior art, the present invention has the following advantages:
[0075] A method for rapid authentication between multiple services in a coal mine comprises: a new user accesses the registration interface of an authentication center through a user terminal, fills in and submits registration information, the authentication center verifies the registration information, and completes user registration; the user enters login information on the login interface of the authentication center, the login request is transmitted to the service provider through an encryption protocol, the service provider forwards the login request to the authentication center for verification, generates an authentication token after the verification is passed, and the authentication token is returned to the user terminal through the service provider; after the user terminal receives the authentication token, it stores the authentication token locally; when the user accesses multiple service rooms in a coal mine, the user terminal initiates an access request with the authentication token, the service provider verifies the validity of the token, and after the verification is passed, the user is allowed to access the corresponding service room; when the authentication token is close to expiration, the user terminal automatically calls the token refresh interface of the authentication center to obtain a new authentication token, so as to ensure the user's continuous login status and authentication authority. Rapid authentication and single sign-on between multiple service systems are realized.
[0076] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention.
[0077] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0079] Figure 1 This is a flow chart of a method for rapid authentication between multiple services in a coal mine according to an embodiment of the present invention;
[0080] Figure 2 A flowchart of submitting registration information in an embodiment of the present invention;
[0081] Figure 3 This is an operational flow chart of a specific example of a method for rapid authentication between multiple services in a coal mine in an embodiment of the present invention. DETAILED DESCRIPTION
[0082] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0083] An embodiment of the present invention provides a method for rapid authentication between multiple services in a coal mine, comprising:
[0084] S101: A new user accesses the registration interface of the authentication center through a user terminal, fills in and submits the registration information, and the authentication center verifies the registration information to complete the user registration;
[0085] S102: The user enters login information on the login interface of the authentication center. The login request is transmitted to the service provider through an encrypted protocol. The service provider forwards the login request to the authentication center for verification. After the verification is successful, an authentication token is generated. The authentication token is returned to the user terminal via the service provider.
[0086] S103: After receiving the authentication token, the user terminal stores the authentication token locally;
[0087] S104: When a user accesses a multi-service room in a coal mine, the user terminal carries an authentication token to initiate an access request, and the service provider verifies the validity of the token. After the verification is passed, the user is allowed to access the corresponding service room;
[0088] S105: When the authentication token is close to expiration, the user terminal automatically calls the token refresh interface of the authentication center to obtain a new authentication token to ensure the user's continuous login status and authentication authority.
[0089] The working principle of the above technical solution is as follows: Figure 3 As shown in the figure, the actual operation process of user Xiao Wang in the coal mining enterprise is as follows:
[0090] User registration: Assume that Xiao Wang is a new employee of a coal mining enterprise and needs to access the production management system, safety monitoring system and equipment management system. Xiao Wang fills in his personal information on the user terminal interface of the authentication center to register, and the user management module of the authentication center verifies and stores his information.
[0091] User login: Xiao Wang enters his username and password on the user terminal and sends the login request to the production management system via the HTTPS protocol. The authentication interface module of the production management system forwards the login request to the authentication management module of the authentication center. The authentication center verifies the username and password, generates a JWT token (containing user identity information and permissions), and returns it to the user terminal through the production management system. Xiao Wang's user terminal stores the JWT token securely (such as the browser's localStorage).
[0092] Accessing the production management system: Xiao Wang needs to view the production plan. The user terminal automatically carries the JWT token to initiate a request to access the production management system. The authentication interface module of the production management system extracts the JWT token and confirms its validity through the token verification interface of the authentication center. The authentication center verifies that the token is valid, and the production management system allows Xiao Wang to view the production plan based on the verification result.
[0093] Accessing the safety monitoring system: Xiao Wang needs to check the safety monitoring data of the mine. The user terminal also carries the JWT token to initiate a request to access the safety monitoring system. The authentication interface module of the safety monitoring system extracts the JWT token, verifies its validity and returns the verification result. After the verification is passed, Xiao Wang can view the safety monitoring data in the mine, such as gas concentration and ventilation conditions.
[0094] Accessing the equipment management system: Xiao Wang needs to view and maintain the status of the mine equipment. The user terminal again carries the JWT token to initiate a request to access the equipment management system. The authentication interface module of the equipment management system also extracts and verifies the JWT token. After the verification is passed, Xiao Wang can view the equipment status and fault warning information.
[0095] Token refresh: When Xiao Wang's JWT token is about to expire, the user terminal obtains a new token through the token refresh interface of the authentication center to maintain the continuity of the login status.
[0096] The beneficial effects of the above technical solution are: ensuring that user information will not be stolen or tampered with during transmission, and preventing man-in-the-middle attacks. Controlling user access rights by verifying the validity of the token ensures that only authorized users can access specific resources and avoid unauthorized access. Users only need to log in once at the authentication center to use the authentication token to access multiple coal mine service rooms (S104), reducing the trouble of frequent logins and improving operational efficiency. Avoiding users from being forced to log out due to token expiration greatly improves the continuity and usability of the system. All authentication logic is centralized in the authentication center management (S101, S102), which facilitates system administrators to uniformly monitor and maintain user information and permissions. By controlling the generation and verification of tokens, service providers can flexibly manage user access rights to different resources. Service providers only need to forward login requests and verification tokens without having to implement complex authentication logic themselves, which helps reduce system complexity and improve maintenance efficiency. Even if new service rooms are added in the future, they only need to use the same token verification mechanism without making major adjustments to the authentication process. Multiple services share the same authentication center, which can avoid each system from independently developing and maintaining user authentication modules, saving development and operation costs.
[0097] In another embodiment, step S101 includes:
[0098] S1011: The user accesses the registration interface of the authentication center on the user terminal and submits the registration information, which includes the user name, password, email address and mobile phone number;
[0099] S1012: The user management module of the authentication center receives the registration information and performs a uniqueness check on the filled-in user name to ensure that the submitted user name has not been registered by others. If the user name already exists, a prompt message is sent to the user terminal to require the user to select another user name;
[0100] S1013: The user management module verifies the integrity of the submitted information to ensure that all required items have been filled in and that the format of the input information complies with the predetermined standards;
[0101] S1014: If the information is complete and in a legal format, the authentication center will continue to verify the legitimacy, including verifying the mobile phone number, by sending a verification code to the mobile phone provided by the user for confirmation;
[0102] S1015: After the verification is passed, the user management module stores the user information in the user database and generates a unique user identifier.
[0103] The working principle of the above technical solution is: when the user opens the registration interface of the authentication center, fill in personal information (including user name, password, email address and mobile phone number) and submit it. This information is transmitted to the user management module of the authentication center through the user terminal. After receiving the registration information, the user management module first checks whether the submitted user name already exists in the database. If the user name already exists, the system sends a prompt message to the user terminal, requiring the user to change the user name. The user management module performs a completeness check on all submitted registration information to ensure that the user has filled in all required items. Then, the system verifies the format of the input, such as the length of the user name, whether the format of the email address is correct, and whether the mobile phone number conforms to the prescribed format. On the premise that the information is complete and the format is correct, the system continues to perform legitimacy verification, such as verifying the mobile phone number. The system sends a verification code to the mobile phone number provided by the user and requires the user to enter the received verification code on the page. After the verification is passed, the user management module stores the user's registration information in the database and generates a unique user identifier (UserID) for each user.
[0104] The beneficial effects of the above technical solution are: through uniqueness check and format verification, it ensures that the information submitted by the user meets the standards, avoids the use of duplicate user names or invalid email addresses and mobile phone numbers, and helps prevent spam registration and data conflicts. The system can promptly prompt users to fill in incorrect information (such as duplicate user names or incorrect formats) and provide guidance to help users complete the registration process smoothly. Ensure the accuracy and validity of information: The mobile phone verification function further ensures that the contact information provided by the registered user is real and valid, increases the security of the account, and avoids false or malicious registration. By generating a unique user identifier for each user, the system can effectively manage the data information of each user and ensure that the system's operations on the user (such as logging in, changing passwords) are accurately associated with their personal information.
[0105] In another embodiment, step S102 includes:
[0106] Based on the login information, the login request is sent to the coal mine multi-service room through an encrypted protocol;
[0107] After receiving the login request, the coal mine multi-service room forwards the login request to the authentication center for user identity authentication;
[0108] The authentication center verifies the login information and generates an authentication token after verification;
[0109] The coal mine multi-service room receives the authentication token generated by the authentication center and returns the authentication token to the user terminal via the access system;
[0110] The user terminal carries the authentication token in subsequent requests;
[0111] The coal mine multi-service room verifies the authentication token through the verification interface of the authentication center, including verifying the signature and validity of the authentication token;
[0112] If the authentication token is verified, the coal mine multi-service room extracts the user identity information and permission information from the authentication token and performs access control to ensure that the user can access information within the scope of the permission.
[0113] The working principle of the above technical solution is as follows: the user submits login information (such as user name and password) through the user terminal. The login request is encrypted using an encryption protocol (such as HTTPS) and transmitted to the coal mine multi-service room through the network to ensure data security during the transmission process. After receiving the encrypted login request, the coal mine multi-service room forwards it to the authentication center for user identity authentication. The authentication center is responsible for handling all user identity authentication related operations. The authentication center verifies according to the received login information. Verification includes checking whether the username and password match. If the verification is successful, the authentication center generates an authentication token (JWT), which contains user identity information, permissions and validity period, and is signed and encrypted. After receiving the authentication token generated by the authentication center, the coal mine multi-service room returns it to the user terminal for subsequent access requests. This process is also transmitted through an encryption protocol. The user terminal carries the authentication token in the next access request. This ensures that the system can identify authenticated users without having to log in again for each operation. The coal mine multi-service room verifies the authentication token provided by the user terminal by calling the verification interface of the authentication center, confirms the signature and validity of the token, and ensures that the token has not been tampered with and is still within the validity period. After the verification token is passed, the coal mine multi-service room extracts the user's identity information and permission information from the authentication token to ensure that the user can only access resources within his or her permission scope.
[0114] The beneficial effects of the above technical solution are: the login information and authentication tokens are transmitted through an encrypted protocol to ensure that the data is not stolen or tampered with in the network, effectively preventing man-in-the-middle attacks. The authentication center strictly verifies the login information to ensure that only legitimate users can obtain authentication tokens and avoid illegal access by unauthorized users. The authentication token mechanism allows users to avoid re-login within a certain period of time, improves user experience, and reduces the load on the authentication center. Through the identity and authority information in the authentication token, fine-grained access control can be implemented between multiple services in the coal mine to ensure that users can only access resources within their authority and avoid unauthorized access. The authentication token mechanism not only ensures the security of user identity authentication, but also simplifies the authentication process for subsequent requests, reduces frequent authentication operations, and improves the efficiency and security of the system.
[0115] In another embodiment, after verification, the user is allowed to access the corresponding service room, including:
[0116] Obtain access request data between multiple services in the coal mine, extract user identity information from the authentication token carried by the user terminal, and the access request data includes user identity data and access service type;
[0117] According to the user identity data and access service type, the access request data is processed in layers to obtain verification data, including:
[0118] Obtain user permission information from user identity data;
[0119] Get the service type associated with each user's permission information as the data to be verified;
[0120] An access authorization result is generated based on the verification data, and the access authorization result is input into the coal mine multi-service room, allowing users to access corresponding service data and functional modules.
[0121] Among them, the access authorization result is generated according to the verification data, including:
[0122] Store user permission information in the permission log;
[0123] Receive user permission rules applicable to multiple services;
[0124] Obtain the service type associated with the user permission information as the data to be verified;
[0125] Aggregate the data to be verified in the permission log to generate access authorization results;
[0126] Generate access policies that define user access rights to multiple services;
[0127] Dynamically adjust access policies based on user job roles and tasks to provide more flexible permission control;
[0128] Combine the user's historical behavior and work content to generate a service recommendation strategy to intelligently recommend related services and improve work efficiency;
[0129] storing the access policy and the service recommendation policy in a memory;
[0130] Input the access authorization results into the coal mine multi-service system, allowing users to access corresponding service data and function modules;
[0131] Sending the access policy to a permission control module in a production environment, where the permission control module accesses the access policy to grant the user access rights to the plurality of services;
[0132] The service recommendation strategy is sent to the user terminal to recommend relevant services to the user and improve work efficiency.
[0133] The working principle of the above technical solution is as follows: after receiving the access request from the user terminal, the coal mine multi-service room extracts the user's identity information and access service type from the authentication token. The authentication token contains the user's identity and permission data, which are critical for subsequent authorization. According to the user's identity data (such as identity ID, role) and access service type, the system processes the request data in layers to obtain the user's permission information. This step ensures that different users and service types have different permission divisions, which complies with the principle of least privilege. The system obtains the specific service room type that the user can access from the user's permission information. Each user has different service access rights, which are associated with specific service types. According to the obtained user permission information and service room type, the data to be verified (verification data) is generated, which will be used for subsequent access authorization decisions. The system generates an access authorization result based on the verification data to determine whether the user has the right to access the requested service or function module. If the authorization is passed, the system allows the user to access. The system inputs the generated authorization result into the coal mine multi-service room, and the coal mine multi-service room opens the corresponding service data and function modules to the user according to the authorization result.
[0134] The beneficial effects of the above technical solution are: extracting identity information and permissions through authentication tokens, ensuring that only users with legal permissions can access corresponding services and data, effectively preventing unauthorized users from accessing key system resources, and meeting security compliance requirements. Through hierarchical processing of user identity data and access service types, the system can implement fine-grained access control, with different user and service types corresponding to different permission levels, ensuring the implementation of the principle of least privilege and reducing security risks. The system can flexibly generate verification data and access authorization results based on the identity and service requirements of different users, support the expansion of different roles and service types, and improve the scalability and flexibility of the system.
[0135] In another embodiment, obtaining a new authentication token includes:
[0136] Receive an authentication token status detection request sent by a user terminal, and obtain the first expiration time information carried in the authentication token; wherein the authentication token is generated by an authentication center after user identity authentication and sent to the user terminal, and in the authentication path corresponding to the authentication token, the user terminal is a terminal device that carries authentication information when accessing a target resource;
[0137] When the remaining valid time represented by the first expiration time information is less than a preset threshold, the user terminal is automatically triggered to call the token refresh interface of the authentication center and send a refresh request carrying the old token to obtain a new authentication token; wherein the preset threshold is used to indicate the time point when the authentication token is close to expiration;
[0138] After successfully obtaining a new authentication token, update the old token saved on the user terminal and ensure the user's continuous login status and authentication authority in the authentication center and the target resource access path;
[0139] An access request carrying a new authentication token is sent to the server corresponding to the target resource, and when an access response of the target resource is obtained, the new authentication token is used for subsequent authentication processes to maintain continuous access rights of the user terminal.
[0140] The working principle of the above technical solution is: the user terminal periodically sends an authentication token status detection request to the system. After receiving the request, the system extracts the first expiration time information in the token. This information is used to determine the validity period of the token. The system calculates the current remaining validity period based on the extracted first expiration time information. If the remaining time of the token is less than the preset threshold (for example, 5 minutes), the system will trigger the token refresh mechanism. When the system detects that the token is about to expire, the user terminal will automatically call the token refresh interface of the authentication center, send the old authentication token as a parameter, and request the authentication center to generate a new authentication token.
[0141] After verifying the user's identity and the old token, the authentication center generates a new authentication token and returns it to the user terminal. The user terminal uses the new token for subsequent access requests. After successfully obtaining the new token, the user terminal automatically updates the locally stored authentication token while maintaining the user's continuous login status and authentication permissions to ensure that the user's access is not interrupted due to token expiration during the entire resource access process. The user terminal passes the new authentication token between the authentication center and the target resource server to ensure that the latest authentication token is used to maintain access rights when accessing the target resource (such as data or functional modules).
[0142] The beneficial effects of the above technical solution are: the system automatically refreshes the token when the authentication token is about to expire, ensuring that the user will not be forced to log out due to authentication failure when accessing the system, thereby ensuring the user's continuous login status. The mechanism of automatically refreshing the token reduces the number of times the user manually re-logins, and the user does not have to frequently authenticate the identity, thereby improving the ease of use and user experience of the system. Through dynamic detection and automatic update of the validity period of the authentication token, the system can promptly replace the token that is about to expire, prevent the occurrence of security risks, and ensure that the user always uses a valid authentication token. In the process of accessing the target resources, the system avoids access interruptions through the automatic token refresh mechanism, ensuring that users can continuously and seamlessly access system functions, which is particularly important in critical business scenarios.
[0143] In another embodiment, generating an authentication token after verification includes:
[0144] Based on the user identity authentication requirements, determine the user information included in the login request;
[0145] Obtain the user database corresponding to the user information;
[0146] The user information is matched and verified with the data in the user database. If the match is successful, an authentication token is generated;
[0147] The user information is matched with the data in the preset verification database. If the match is successful, an authentication token is generated, including:
[0148] The user name in the verification information is searched in the verification database. If the match fails, the login failure result is output; if the match succeeds, the corresponding password information in the database is obtained;
[0149] Match the password entered by the user with the password information in the database. If the match is successful, generate an authentication token in the JWT format.
[0150] After the authentication token is generated, the token contains the user's identity information and signature, and the signature is encrypted based on the private key of the authentication center;
[0151] Return the generated authentication token to the client as a credential for subsequent access to system resources;
[0152] If the username and password do not match, a login failure result is output and the login request is rejected.
[0153] The generated authentication token is returned to the client, including:
[0154] Obtain user identity information and user terminal device information or geographic location information;
[0155] Generate a signature containing user identity information;
[0156] Use the private key of the certification center to encrypt the signature and generate an encrypted signature;
[0157] Integrate user identity information, cryptographic signatures, and dynamically changing elements (such as one-time passwords (OTPs)) into authentication tokens;
[0158] Associating authentication tokens with user terminal devices or geographic locations to prevent tokens from being used on unauthorized devices or locations;
[0159] The generated authentication token is returned to the client as a credential for subsequent access to system resources.
[0160] The working principle of the above technical solution is: when the system receives a user login request, it extracts user information from the request, usually including username and password. This information is the basis for user identity verification. User A enters username and password when logging into the system, and the system extracts these two pieces of information for subsequent verification.
[0161] Based on the extracted user information, the system accesses the corresponding user database, which stores the information of all registered users in the system. The system first searches the user database for the username provided in the login request. If the username does not exist, a login failure result is immediately returned. If the username matches successfully, the system extracts the password information corresponding to the username from the database and compares it with the password entered by the user. If the password matches successfully, the verification is successful; otherwise, a login failure result is returned. After the username and password match successfully, the system generates an authentication token in JWT (JSON WebToken) format. The token contains the user's identity information and the system signature. The signature is generated based on the private key encryption of the authentication center to ensure the integrity and security of the token. The generated authentication token is returned to the client as a credential for subsequent access to system resources. The client will carry the authentication token for identity authentication each time it requests system resources. If the username or password fails to match, the system will output a login failure result and reject the user's login request.
[0162] The beneficial effects of the above technical solution are: by matching the username and password, and subsequently generating the JWT token based on the private key signature, the secure verification of the user's identity is ensured to prevent unauthorized users from logging in. The signature in the JWT token is generated based on the private key encryption of the authentication center, which ensures the security of the authentication token during transmission and prevents tampering and forgery. Once the authentication token is generated, the client only needs to carry the token in subsequent requests, without the need to repeatedly verify the username and password, which improves the convenience of the system and the user experience. The JWT token is stateless, and there is no need to store user session information on the server side for each request, which reduces the load on the server and improves the efficiency and response speed of the system.
[0163] In another embodiment, based on the user identity authentication requirement, determining the user information included in the login request includes:
[0164] Parse the login request to obtain the username and password entered by the user;
[0165] Pre-process the username and password to obtain cleaned user information;
[0166] Use the user name and password as the information to be verified.
[0167] The working principle of the above technical solution is as follows: the system first receives the user's login request and extracts the user name and password entered by the user. This step ensures that the system can recognize the user's login intention and collect the necessary authentication information. In order to improve the accuracy and consistency of the data, the system preprocesses the extracted username and password. The preprocessing process may include removing spaces, converting uppercase and lowercase, removing special characters, etc. to ensure the reliability of the user input information. After preprocessing, the system obtains the formatted username and password. This cleaned information will be used as information to be verified and compared with the records in the database. The processed username and password will be combined into a set of information to be verified. The information package will be passed to the verification module for comparison with the user data stored in the database.
[0168] The beneficial effects of the above technical solution are: by preprocessing the user name and password, the system effectively reduces the risk caused by inconsistent input formats, making the information to be verified more reliable and avoiding verification failures due to format problems. In the preprocessing stage, the system removes spaces and handles issues such as uppercase and lowercase letters, and can be tolerant of some minor mistakes or input habits of users, improving the user experience. For example, users do not need to pay too much attention to the input format, the system will automatically adjust it.
[0169] In another embodiment, obtaining user authority information from user identity data includes:
[0170] Parse the user's identity data to obtain a permission information set related to the identity data; the permission information set includes the user's role, permission level, and accessible information list;
[0171] Generate access authorization results based on the data to be verified, including:
[0172] Match the user permission information with each type in the service room type to determine the user's authorization level for the service room type;
[0173] If the user permission information meets the preset access conditions, an access authorization result is generated;
[0174] If the user permission information does not meet the access conditions, an access authorization result of authorization denial is generated.
[0175] The working principle of the above technical solution is as follows: the system first parses the user's identity data to obtain the permission information related to the user. The identity data may include the user's ID, authentication token or other identity identification information. The system extracts the user's role, permission level and accessible resource list from it. After parsing the identity data, the system summarizes the user's role, permission level and accessible resource list to form the user's permission information set. This information is used to determine the scope of operations that the user can perform. Based on the service architecture, the system needs to match the user's permission information with each type in the service type. For example, services may be divided into different types such as read, write, and delete. The system will determine the user's authorization level for each service type based on the user's permission information. The system generates an access authorization result based on the permission matching result. If the user's permission information meets the preset access conditions, an access result of "authorization passed" is generated, allowing the user to perform the requested operation; if the permission does not meet the conditions, an "authorization denied" result is generated to prevent the user from accessing.
[0176] The beneficial effects of the above technical solution are as follows: the system effectively ensures the accuracy of permission control by parsing and matching the user's permission information and service type. Each user can only access functions or data within the scope of his or her permission, avoiding the occurrence of unauthorized operations. Through strict permission matching and verification processes, the system can prevent unauthorized users from performing sensitive operations, thereby enhancing the security of the system. For example, ordinary users are prevented from accessing or modifying high-level management data. The permission information set can be dynamically adjusted according to the roles, permission levels, and resources required to be accessed of different users, supporting flexible permission management solutions. This allows the system to adjust permissions at any time according to organizational structure or business needs. For users who do not meet the access conditions, the system generates an "authorization denied" result, thereby preventing users from mistakenly accessing sensitive information or performing unauthorized operations, and reducing the probability of system errors.
[0177] In another embodiment, a system for rapid authentication between multiple services in a coal mine includes:
[0178] The registration unit is used for new users to access the registration interface of the authentication center through the user terminal, fill in and submit the registration information, and the authentication center verifies the registration information to complete the user registration;
[0179] Login unit, used for users to input login information on the login interface of the authentication center. The login request is transmitted to the service provider through an encrypted protocol. The service provider forwards the login request to the authentication center for verification. After the verification is passed, an authentication token is generated. The authentication token is returned to the user terminal via the service provider;
[0180] The token storage unit is used to store the authentication token locally after the user terminal receives the authentication token;
[0181] The service access unit is used when a user accesses multiple service rooms in a coal mine. The user terminal carries the authentication token to initiate an access request. The service provider verifies the validity of the token. After the verification is passed, the user is allowed to access the corresponding service room.
[0182] The token refresh unit is used to automatically call the token refresh interface of the authentication center when the authentication token is about to expire, and obtain a new authentication token to ensure the user's continuous login status and authentication authority.
[0183] The working principle of the above technical solution is as follows: including the authentication center, service provider and user terminal. These three parts work together to ensure the safe, reliable and continuous authentication and access control of users in the coal mine multi-service system. The following is a detailed working mechanism and interaction process:
[0184] Authentication Center: The authentication center is the core of the entire system, responsible for managing user identity, authentication process, and token generation and verification. Its functional modules include:
[0185] User management module:
[0186] Provides functions such as user registration, information update, and password management. All user information is stored in the database, including user name, password (encrypted storage), role, and permissions.
[0187] When users register or update their information, it will be stored in a database and encryption technology will be used to protect sensitive information.
[0188] Authentication management module:
[0189] Process user login requests and verify user identities. Users enter their usernames and passwords through their user terminals, and the information is transmitted to the authentication center for verification.
[0190] After the verification is passed, the authentication management module generates a JWT (JSON Web Token) token, which contains the user's identity information, permission information, validity period, etc.
[0191] Token Management Module:
[0192] Responsible for generating, verifying and managing JWT tokens. After the user successfully logs in, the authentication center generates a token containing user information and permissions and sends it back to the user terminal.
[0193] The token verification mechanism ensures that the validity of the token can be verified each time a user initiates a service request, ensuring the security and continuity of the user session.
[0194] Token refresh mechanism: When a token is about to expire, the authentication center can generate a new token based on the request of the user terminal, ensuring that the user does not need to re-login frequently during the session.
[0195] Logging and auditing modules:
[0196] All authentication requests and responses are recorded for auditing and tracing. The module also detects abnormal login attempts and potential security threats to ensure the security of the system.
[0197] Service provider: The service provider acts as an intermediate bridge between the authentication center and the user terminal, and also provides specific business services. Its main modules include:
[0198] Authentication interface module: responsible for communicating with the authentication center, forwarding the user's login request to the authentication center and receiving its authentication results.
[0199] When a user requests access to a service, the authentication interface module verifies the validity of the JWT token and performs token verification through the authentication center's API interface.
[0200] Business processing module: This module processes user business requests and performs access control based on user identity and permission information.
[0201] The business processing module supports multiple functions, such as production management, equipment control and data query. The access rights of each functional module are controlled according to the user identity.
[0202] Log module: records the user's operation logs in the system. These logs not only help track and manage user behavior, but also provide a basis for tracing when security incidents occur.
[0203] User terminal: The user terminal is the interface for users to interact with the system, usually an application or browser interface with login and service access functions. Its main modules include:
[0204] Login interface: provides an interface for users to enter their username and password. The information entered by the user is sent to the service provider through an encrypted protocol, and then forwarded by the service provider to the authentication center for verification.
[0205] Token management module: This module is responsible for storing and managing JWT tokens. The tokens are usually stored in the browser's local storage or session storage to ensure that the tokens are continuously carried across multiple visits.
[0206] The user terminal automatically carries the token in subsequent service requests, ensuring that the authentication center and service provider can continue to verify its identity.
[0207] The service providers in the entire system support a variety of business systems, including:
[0208] Production management system: manage production planning, scheduling and execution to ensure the orderly progress of mine production.
[0209] Safety monitoring system: real-time monitoring of mine safety conditions, such as gas concentration, ventilation conditions, etc., to ensure production safety.
[0210] Equipment management system: manage and maintain mine equipment, including equipment status monitoring and fault warning to ensure the normal operation of equipment.
[0211] Personnel Positioning System: Real-time tracking of the location of workers in the mine to ensure safe and efficient personnel management.
[0212] Summary of the interaction process
[0213] Registration and login: Users register and log in through the user terminal, and the information is sent to the service provider through an encrypted protocol, which then forwards it to the authentication center for verification.
[0214] Token generation and storage: After verification, the authentication center generates a JWT token and returns it to the user terminal, which stores the token.
[0215] Service access: When a user initiates a service request, he / she carries a token for verification. After the service provider confirms that the token is valid, it allows access to the corresponding service.
[0216] Token refresh: When the token is about to expire, the user terminal automatically requests the authentication center to refresh the token to keep the session valid.
[0217] The beneficial effects of the above technical solution are: ensuring the access control and continuous authentication of users in the coal mine multi-service system, and also improving the security and management efficiency of the system through log auditing and security monitoring.
[0218] In another embodiment, the logging unit comprises:
[0219] Based on the login information, the login request is sent to the coal mine multi-service room through an encrypted protocol;
[0220] After receiving the login request, the coal mine multi-service room forwards the login request to the authentication center for user identity authentication;
[0221] The authentication center verifies the login information and generates an authentication token after verification;
[0222] The coal mine multi-service room receives the authentication token generated by the authentication center and returns the authentication token to the user terminal via the access system;
[0223] The user terminal carries the authentication token in subsequent requests;
[0224] The coal mine multi-service room verifies the authentication token through the verification interface of the authentication center, including verifying the signature and validity of the authentication token;
[0225] If the authentication token is verified, the coal mine multi-service room extracts the user identity information and permission information from the authentication token and performs access control to ensure that the user can access information within the scope of the permission.
[0226] The working principle of the above technical solution is: the user enters the login information through the client (such as mobile application or web terminal), and the login request is sent to the coal mine multi-service system through the HTTPS protocol. The HTTPS protocol ensures that the data will not be eavesdropped or tampered with during the transmission process.
[0227] After receiving the user login request, the coal mine multi-service room forwards the request to the authentication center. The authentication center is the main component responsible for verifying the user's identity.
[0228] The authentication center verifies the login information (such as username and password) provided by the user, and generates a JWT token after verification. JWT consists of three parts:
[0229] Header: declares the token type (JWT) and the signature algorithm (such as HS256 or RS256).
[0230] Payload: includes the user's identity information (such as user ID, user name), permission information, and the validity period of the token.
[0231] Signature: The certification authority uses its private key to sign the Header and Payload parts to ensure that the data cannot be tampered with.
[0232] After the authentication center generates the JWT token, the coal mine multi-service room returns the token to the user terminal. The user terminal will carry the JWT token in subsequent requests.
[0233] When the user carries the JWT token for subsequent operations, the coal mine multi-service room will verify the token through the verification interface of the authentication center, including:
[0234] Verify the signature: Use the public key of the certification center to verify whether the signature of the token is valid to ensure that the data has not been tampered with.
[0235] Verify validity: confirm whether the token is within the validity period (verified by the exp field).
[0236] If the verification is successful, the coal mine multi-service room will extract the user's identity information and permission information from the Payload of the JWT token, perform access control, and ensure that the user can only access resources within his or her permission scope.
[0237] Encrypted transmission is performed through the HTTPS protocol to ensure the confidentiality and integrity of authentication request and response data, and prevent third parties from eavesdropping or tampering with data during transmission.
[0238] The authentication center provides a standardized RESTful API interface for integration with external systems. Support functions include:
[0239] User registration: The external system registers new users through the API interface.
[0240] User login authentication: Verify user identity and return a JWT token.
[0241] Token Validation: Verify the validity of the JWT token.
[0242] Token refresh: Supports refreshing expired tokens and generating new tokens.
[0243] The beneficial effects of the above technical solution are: it realizes fast authentication and single sign-on between multiple service systems, which not only greatly improves user experience and work efficiency, but also enhances system security and management convenience, and has broad application prospects.
[0244] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for rapid authentication between multiple services in a coal mine, characterized by comprising: S101: A new user accesses the registration interface of the authentication center through a user terminal, fills in and submits the registration information, and the authentication center verifies the registration information to complete the user registration; S102: The user enters login information on the login interface of the authentication center. The login request is transmitted to the service provider through an encrypted protocol. The service provider forwards the login request to the authentication center for verification. After the verification is successful, an authentication token is generated. The authentication token is returned to the user terminal via the service provider. S103: After receiving the authentication token, the user terminal stores the authentication token locally; S104: When a user accesses a multi-service room in a coal mine, the user terminal carries an authentication token to initiate an access request, and the service provider verifies the validity of the token. After the verification is passed, the user is allowed to access the corresponding service room; S105: When the authentication token is close to expiration, the user terminal automatically calls the token refresh interface of the authentication center to obtain a new authentication token to ensure the user's continuous login status and authentication authority; After verification, the user is allowed to access the corresponding service room, including: Obtain access request data between multiple services in the coal mine, extract user identity information from the authentication token carried by the user terminal, and the access request data includes user identity data and access service type; According to the user identity data and access service type, the access request data is processed in layers to obtain verification data, including: Obtain user permission information from user identity data; Get the service type associated with each user's permission information as the data to be verified; Generate access authorization results based on verification data, and input the access authorization results into the coal mine multi-service room, allowing users to access corresponding service data and functional modules; Obtain a new authentication token, including: Receive an authentication token status detection request sent by a user terminal, and obtain the first expiration time information carried in the authentication token; wherein the authentication token is generated by an authentication center after user identity authentication and sent to the user terminal, and in the authentication path corresponding to the authentication token, the user terminal is a terminal device that carries authentication information when accessing a target resource; When the remaining valid time represented by the first expiration time information is less than a preset threshold, the user terminal is automatically triggered to call the token refresh interface of the authentication center and send a refresh request carrying the old token to obtain a new authentication token; wherein the preset threshold is used to indicate the time point when the authentication token is close to expiration; After successfully obtaining a new authentication token, update the old token saved on the user terminal and ensure the user's continuous login status and authentication authority in the authentication center and the target resource access path; An access request carrying a new authentication token is sent to the server corresponding to the target resource, and when an access response of the target resource is obtained, the new authentication token is used for subsequent authentication processes to maintain continuous access rights of the user terminal.
2. A method for rapid authentication between multiple services in a coal mine according to claim 1, characterized in that: Step S101 includes: S1011: The user accesses the registration interface of the authentication center on the user terminal and submits the registration information, which includes the user name, password, email address and mobile phone number; S1012: The user management module of the authentication center receives the registration information and performs a uniqueness check on the filled-in user name to ensure that the submitted user name has not been registered by others. If the user name already exists, a prompt message is sent to the user terminal to require the user to select another user name; S1013: The user management module verifies the integrity of the submitted information to ensure that all required items have been filled in and that the format of the input information complies with the predetermined standards; S1014: If the information is complete and in a legal format, the authentication center will continue to verify the legitimacy, including verifying the mobile phone number, by sending a verification code to the mobile phone provided by the user for confirmation; S1015: After the verification is passed, the user management module stores the user information in the user database and generates a unique user identifier.
3. A method for rapid authentication between multiple services in a coal mine according to claim 1, characterized in that: Step S102 includes: Based on the login information, the login request is sent to the coal mine multi-service room through an encrypted protocol; After receiving the login request, the coal mine multi-service room forwards the login request to the authentication center for user identity authentication; The authentication center verifies the login information and generates an authentication token after verification; The coal mine multi-service room receives the authentication token generated by the authentication center and returns the authentication token to the user terminal via the access system; The user terminal carries the authentication token in subsequent requests; The coal mine multi-service room verifies the authentication token through the verification interface of the authentication center, including verifying the signature and validity of the authentication token; If the authentication token is verified, the coal mine multi-service room extracts the user identity information and permission information from the authentication token and performs access control to ensure that the user can access information within the scope of the permission.
4. A method for rapid authentication between multiple services in a coal mine according to claim 3, characterized in that: After verification, an authentication token is generated, including: Based on the user identity authentication requirements, determine the user information included in the login request; Obtain the user database corresponding to the user information; The user information is matched and verified with the data in the user database. If the match is successful, an authentication token is generated; The user information is matched with the data in the preset verification database. If the match is successful, an authentication token is generated, including: The user name in the verification information is searched in the verification database. If the match fails, the login failure result is output; if the match succeeds, the corresponding password information in the database is obtained; Match the password entered by the user with the password information in the database. If the match is successful, generate an authentication token in the JWT format. After the authentication token is generated, the token contains the user's identity information and signature, and the signature is encrypted based on the private key of the authentication center; Return the generated authentication token to the client as a credential for subsequent access to system resources; If the username and password do not match, a login failure result is output and the login request is rejected.
5. A method for rapid authentication between multiple services in a coal mine according to claim 4, characterized in that: Based on the user identity authentication requirements, determine the user information included in the login request, including: Parse the login request to obtain the username and password entered by the user; Pre-process the username and password to obtain cleaned user information; Use the user name and password as the information to be verified.
6. A method for rapid authentication between multiple services in a coal mine according to claim 1, characterized in that: Obtain user permission information from user identity data, including: Parse the user's identity data to obtain a permission information set related to the identity data; the permission information set includes the user's role, permission level, and accessible information list; Generate access authorization results based on the data to be verified, including: Match the user permission information with each type in the service room type to determine the user's authorization level for the service room type; If the user permission information meets the preset access conditions, an access authorization result is generated; If the user permission information does not meet the access conditions, an access authorization result of authorization denial is generated.
7. A system for rapid authentication between multiple services in a coal mine, characterized in that: include: The registration unit is used for new users to access the registration interface of the authentication center through the user terminal, fill in and submit the registration information, and the authentication center verifies the registration information to complete the user registration; Login unit, used for users to input login information on the login interface of the authentication center. The login request is transmitted to the service provider through an encrypted protocol. The service provider forwards the login request to the authentication center for verification. After the verification is passed, an authentication token is generated. The authentication token is returned to the user terminal via the service provider; The token storage unit is used to store the authentication token locally after the user terminal receives the authentication token; The service access unit is used when a user accesses multiple service rooms in a coal mine. The user terminal carries the authentication token to initiate an access request. The service provider verifies the validity of the token. After the verification is passed, the user is allowed to access the corresponding service room. The token refresh unit is used to automatically call the token refresh interface of the authentication center when the authentication token is about to expire, and obtain a new authentication token to ensure the user's continuous login status and authentication authority; After verification, the user is allowed to access the corresponding service room, including: Obtain access request data between multiple services in the coal mine, extract user identity information from the authentication token carried by the user terminal, and the access request data includes user identity data and access service type; According to the user identity data and access service type, the access request data is processed in layers to obtain verification data, including: Obtain user permission information from user identity data; Get the service type associated with each user's permission information as the data to be verified; Generate access authorization results based on verification data, and input the access authorization results into the coal mine multi-service room, allowing users to access corresponding service data and functional modules; Obtain a new authentication token, including: Receive an authentication token status detection request sent by a user terminal, and obtain the first expiration time information carried in the authentication token; wherein the authentication token is generated by an authentication center after user identity authentication and sent to the user terminal, and in the authentication path corresponding to the authentication token, the user terminal is a terminal device that carries authentication information when accessing a target resource; When the remaining valid time represented by the first expiration time information is less than a preset threshold, the user terminal is automatically triggered to call the token refresh interface of the authentication center and send a refresh request carrying the old token to obtain a new authentication token; wherein the preset threshold is used to indicate the time point when the authentication token is close to expiration; After successfully obtaining a new authentication token, update the old token saved on the user terminal and ensure the user's continuous login status and authentication authority in the authentication center and the target resource access path; An access request carrying a new authentication token is sent to the server corresponding to the target resource, and when an access response of the target resource is obtained, the new authentication token is used for subsequent authentication processes to maintain continuous access rights of the user terminal.
8. A system for rapid authentication of multiple service rooms in a coal mine according to claim 7, characterized in that: The login unit includes: Based on the login information, the login request is sent to the coal mine multi-service room through an encrypted protocol; After receiving the login request, the coal mine multi-service room forwards the login request to the authentication center for user identity authentication; The authentication center verifies the login information and generates an authentication token after verification; The coal mine multi-service room receives the authentication token generated by the authentication center and returns the authentication token to the user terminal via the access system; The user terminal carries the authentication token in subsequent requests; The coal mine multi-service room verifies the authentication token through the verification interface of the authentication center, including verifying the signature and validity of the authentication token; If the authentication token is verified, the coal mine multi-service room extracts the user identity information and permission information from the authentication token and performs access control to ensure that the user can access information within the scope of the permission.
Citation Information
Patent Citations
Client information authentication method and system of micro-service architecture
CN113783695A
Cross-domain single sign-on method and system based on browser fingerprints
CN116668190A