Micro-service platform access method and related device thereof

文档序号:1878275 发布日期:2021-11-23 浏览:4次 中文

阅读说明:本技术 一种微服务平台访问方法及其相关装置 (Micro-service platform access method and related device thereof ) 是由 张树文 雷中雄 于 2020-05-19 设计创作,主要内容包括:本发明实施例提供了一种微服务平台访问方法及相关装置,用于实现微服务平台访问方法的多样化。本发明实施例方法包括:接收来自网关的第一应用访问请求,第一应用集成于所述微服务平台,判断访问请求内是否带有有效的第一标识信息,若访问请求内不带有有效的第一标识信息,则判断访问请求内是否带有第一目标页面信息,第一目标页面为用户自定义的登录页面,若访问请求内带有第一目标页面信息,则根据目标页面信息跳转至第一目标页面,根据第一目标页面的登录选项登录第一应用。其中,根据当前访问请求判断该访问请求对应的第一应用是否绑定了自定义登录页面,从而实现可以通过自定义页面登录微服务平台,实现了微服务微服务平台访问方法的多样化。(The embodiment of the invention provides a micro service platform access method and a related device, which are used for realizing the diversification of the micro service platform access method. The method provided by the embodiment of the invention comprises the following steps: receiving a first application access request from a gateway, wherein the first application is integrated in the micro service platform, judging whether the access request has effective first identification information, if the access request does not have the effective first identification information, judging whether the access request has first target page information, the first target page is a user-defined login page, if the access request has the first target page information, jumping to the first target page according to the target page information, and logging in the first application according to the login option of the first target page. Whether a first application corresponding to the access request is bound with a user-defined login page or not is judged according to the current access request, so that the micro-service platform can be logged in through the user-defined page, and diversification of the access method of the micro-service platform is realized.)

1. A micro service platform access method is characterized by comprising the following steps:

receiving a first application access request through a browser, wherein the first application is integrated in the micro service platform;

judging whether the access request has effective first identification information or not, wherein the first identification indicates the login state of a first application, is stored in a cookie of the browser when the login of the first application is successful, and is generated by encrypting an access key issued to the first application by a platform;

if the access request does not contain effective first identification information, judging whether the first application is bound with a user-defined login page or not;

and if the first application is bound with a custom login page, skipping to the custom login page bound by the first application according to the address information of the bound custom login page, prompting a user to log in, executing the first application access request after the login is successful, and then generating effective first identification information to be stored in the browser.

2. The method according to claim 1, wherein if the first application is not bound to a custom login page, jumping to a default login page provided by the micro service platform, providing an account password login interface to log in the first application, and executing the first application access request after login is successful, and generating valid first identification information to be stored in the browser.

3. The method according to claim 1, wherein if the login system corresponding to the first application-bound custom login page confirms that the login system is the external system of the micro service platform, the method jumps to the first application-bound custom login page to prompt a user to log in, executes the first application access request after the login is successful, and then generates valid first identification information to be stored in the browser, specifically comprising:

jumping to a login system outside the platform according to the bound custom login page address;

receiving a first application access request sent by an off-platform login system, judging whether a request source address is consistent with a bound custom login page address, if so, confirming that login is successful, executing the first application access request, and generating effective first identification information by following an access key corresponding to a first application and storing the effective first identification information in a browser.

4. The method of claim 2, further comprising:

calculating the webpage jump times generated according to the first application access request;

judging whether the webpage skipping times are larger than a preset threshold value or not;

and if so, ending the webpage jump generated according to the first application access request.

5. The method of claim 1, wherein after logging into the first application according to the login option of the first target page, the method further comprises:

receiving a service calling request sent by the first application, wherein the service calling request carries second identification information, and the second identification information is generated by encrypting login information by using an access key corresponding to the first application;

judging whether second identification information carried in the service calling request sent by the first application is legal or not;

if so, generating a calling request sent to the second application according to a service calling request sent by the first application, and receiving data sent by the second application;

the data is sent to a first application.

6. The method of claim 1, wherein the first application access request is executed directly if the access request carries valid first identification information.

7. A microservice platform access system, comprising:

a receiving unit, configured to receive a first application access request through a browser, where the first application is integrated in the microservice platform;

the judging unit is used for judging whether the access request contains effective first identification information or not, the first identification indicates a first application login state, the first identification is stored in a cookie of the browser when the first application login is successful, and an access key issued to the first application by the platform is generated in an encrypted manner;

the judging unit is further configured to judge whether the first application is bound with a custom login page if the access request does not contain valid first identification information;

and the processing unit is used for skipping to the user-defined login page bound by the first application according to the address information of the bound user-defined login page, prompting a user to log in, executing the first application access request after the login is successful, and then generating effective first identification information to be stored in the browser.

8. The system of claim 7, wherein the processing unit is further configured to:

and if the first application is not bound to the self-defined login page, jumping to a default login page provided by a micro service platform, providing an account password login interface to login the first application, executing the first application access request after login is successful, generating effective first identification information and storing the effective first identification information in the browser.

9. A computer device, comprising:

a processor, a memory, an input-output device, and a bus;

the processor, the memory and the input and output equipment are respectively connected with the bus;

the processor is configured to perform the method of any one of claims 1 to 6.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when being executed by a processor, realizes the steps of the method according to any one of claims 1 to 6.

Technical Field

The present application relates to the field of communications, and in particular, to a method for accessing a micro service platform and a related apparatus.

Background

Single Sign On (Single Sign On), abbreviated as SSO, is one of the solutions for enterprise business integration that is popular at present. The definition of SSO is that in a plurality of application systems, a user can log in all mutually trusted application systems only by logging in once.

Generally, the single sign-on method is that an enterprise integrates developed applications on the same application platform, and after logging on the application platform, the application system of the application platform can realize single sign-on to a resource platform so as to log on resources.

For the prior art, generally, the micro service platform logs in through a login page of the micro service platform, and each time the micro service platform logs in, a website of a target micro service platform needs to be searched first and then the micro service platform logs in through the login page of the micro service platform, so that the login method is single, the process is complex, and the waste of resources is caused.

Disclosure of Invention

The embodiment of the invention provides a micro service platform access method and a related device, which are used for realizing the diversification of a micro service platform login method.

The first aspect of the embodiments of the present invention provides a method for accessing a micro service platform, including:

receiving a first application access request through a browser, wherein the first application is integrated in the micro service platform;

judging whether the access request has effective first identification information or not, wherein the first identification indicates the login state of a first application, is stored in a cookie of the browser when the login of the first application is successful, and is generated by encrypting an access key issued to the first application by a platform;

if the access request does not contain effective first identification information, judging whether the first application is bound with a user-defined login page or not;

and if the first application is bound with a custom login page, skipping to the custom login page bound by the first application according to the address information of the bound custom login page, prompting a user to log in, executing the first application access request after the login is successful, and then generating effective first identification information to be stored in the browser.

Optionally, if the first application is not bound to a custom login page, jumping to a second target page, where the second target page is a default login page provided by the micro service platform and is used to provide an account password login interface to log in the first application, execute the first application access request after login is successful, generate effective first identification information, and store the effective first identification information in the browser.

Optionally, if the login system corresponding to the user-defined login page bound to the first application confirms that the login system is the external system of the micro service platform, the user is prompted to log in by jumping to the user-defined login page bound to the first application, the first application access request is executed after the login is successful, and then effective first identification information is generated and stored in the browser, which specifically includes:

jumping to a login system outside the platform according to the bound custom login page address;

receiving a first application access request sent by an off-platform login system, judging whether a request source address is consistent with a bound custom login page address, if so, confirming that login is successful, executing the first application access request, and generating effective first identification information by following an access key corresponding to a first application and storing the effective first identification information in a browser.

Optionally, the method further comprises:

calculating the webpage jump times generated according to the first application access request;

judging whether the webpage skipping times are larger than a preset threshold value or not;

and if so, ending the webpage jump generated according to the first application access request.

Optionally, after logging in the first application according to the login option of the first target page, the method further includes:

receiving a service calling request sent by the first application, wherein the service calling request carries second identification information, and the second identification information is generated by encrypting login information by using an access key corresponding to the first application;

judging whether second identification information carried in the service calling request sent by the first application is legal or not;

if so, generating a calling request sent to the second application according to a service calling request sent by the first application, and receiving data sent by the second application;

the data is sent to a first application.

Optionally, if the access request includes first identification information, jumping to the first application.

A second aspect of the embodiments of the present invention provides a micro service platform access system, including:

a receiving unit, configured to receive a first application access request through a browser, where the first application is integrated in the microservice platform;

the judging unit is used for judging whether the access request contains effective first identification information or not, the first identification indicates a first application login state, the first identification is stored in a cookie of the browser when the first application login is successful, and an access key issued to the first application by the platform is generated in an encrypted manner;

the judging unit is further configured to judge whether the first application is bound with a custom login page if the access request does not contain valid first identification information;

and the processing unit is used for skipping to the user-defined login page bound by the first application according to the address information of the bound user-defined login page, prompting a user to log in, executing the first application access request after the login is successful, and then generating effective first identification information to be stored in the browser.

Optionally, the processing unit is further configured to:

and if the first application is not bound to the self-defined login page, jumping to a default login page provided by the micro service platform, providing an account password login interface to login the first application, executing the first application access request after login is successful, generating effective first identification information and storing the effective first identification information in the browser.

A third aspect of embodiments of the present application provides a computer apparatus, including:

a processor, a memory, an input-output device, and a bus;

the processor, the memory and the input and output equipment are respectively connected with the bus;

the processor is configured to perform the method according to any of the preceding embodiments.

A fourth aspect of embodiments of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein: which when executed by a processor implements the steps of the method according to the previous embodiment.

In this embodiment, a first application access request is received through a browser, the first application is integrated in the micro service platform, and whether the access request has valid first identifier information is determined, where the first identifier indicates a first application login state, when the first application is successfully logged in, storing the first application in a cookie of the browser, generating an access key issued by a platform to the first application in an encryption mode, if the access request does not contain valid first identification information, judging whether the first application is bound with a user-defined login page or not, if the first application is bound with the user-defined login page, skipping to the self-defined login page bound by the first application according to the address information of the bound self-defined login page, prompting the user to log in, and after the login is successful, executing the first application access request, and then generating effective first identification information to be stored in the browser. And judging whether the current access request is bound with a user-defined login page or not, so that the micro service platform can be logged in through the user-defined page, and the application login method of the micro service platform is diversified.

Drawings

FIG. 1 is a schematic diagram illustrating an embodiment of a method for accessing a micro service platform according to an embodiment of the present application;

FIG. 2 is another schematic diagram of an embodiment of a method for accessing a micro service platform according to an embodiment of the present application;

FIG. 3 is another diagram illustrating an embodiment of a method for accessing a micro service platform according to an embodiment of the present application;

FIG. 4 is another diagram illustrating an embodiment of a method for accessing a micro service platform according to an embodiment of the present application;

FIG. 5 is another diagram illustrating an embodiment of a method for accessing a micro service platform according to an embodiment of the present application;

FIG. 6 is another diagram illustrating an embodiment of a method for accessing a micro service platform according to an embodiment of the present application;

FIG. 7 is a diagram illustrating an embodiment of a micro service platform access system according to an embodiment of the present application;

fig. 8 is a schematic diagram of a computer device according to an embodiment of the present application.

Detailed Description

The embodiment of the invention provides a micro-service platform access method and a related device, which are used for realizing the diversification of the micro-service platform access method.

In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.

The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

Micro-services refer to the development of a single small but business-enabled service, each with its own processing and lightweight communication mechanism, that can be deployed on a single or multiple servers. For each user needing to access and log in, when the user wants to log in other systems in the same platform, the account logged in from the own system is authenticated to the authentication center and generates identification information, so that the identification information is used for a process of verifying the account by the authentication center when the user logs in other systems, the account can be verified only by the same set of account information in different systems, and more waste on the process exists in the actual use process.

For convenience of understanding, a specific flow in the embodiment of the present application is described below, and referring to fig. 1, an embodiment of a method for accessing a micro service platform in the embodiment of the present invention includes:

101. receiving a first application access request through a browser, wherein the first application is integrated in the micro service platform;

in this embodiment, the micro service platform receives, from the browser, an access request of a first application, that is, a target application, where the access request may be initiated by a user who has logged in the micro service platform or initiated by a user who has not logged in the micro service platform, and the access request is for logging in the target application integrated in the platform architecture through the micro service platform.

102. Judging whether the access request has effective first identification information or not, wherein the first identification indicates the login state of a first application, is stored in a cookie of the browser when the login of the first application is successful, and is generated by encrypting an access key issued to the first application by a platform;

in this embodiment, the access key is an access key corresponding to an application, and is issued by the platform when the application accesses the micro service platform.

Specifically, the first identification information is generated after the user successfully logs in the application, indicates the login state of the application, is generated by encrypting the login information by the access key of the first application, and identifies the expiration time and other information. The effective first identification information indicates that the user to be logged in already logs in the micro service platform, namely the user to be logged in meets the direct login condition, the condition can be that in a certain time range when the login request is received, the target user already logs in the micro service platform through the account number password, the micro service platform decrypts the first identification information according to the access key of the first application stored in the micro service platform, after the login state is confirmed to be effective, namely the default login state is effective, the access request is executed, for the micro service platform, the user account number password of the first application does not need to be managed, whether the access is allowed or not can be judged only by storing the access key, the access flow is simplified, and the access speed is improved. The first identification is stored in a cookie of a user browser after the user logs in the micro service platform and successfully logs in, the first identification is carried in an access request in the next access, and the micro service platform directly judges whether the access is allowed or not after receiving the access request.

Further, the judgment on the validity of the first identification information may be that the first application access key is decrypted, and then interface information corresponding to the user to be logged in and a specific code which is issued by the micro service platform for the user to be logged and stored in a cookie section in a browser of the user to be logged in are obtained, where the code may indicate that the user has logged in the micro service platform, and if the code matches with pre-stored data in the micro service platform for the user to be logged in, the first identification information is valid, otherwise, the first identification information is determined to be invalid.

103. If the access request does not contain effective first identification information, judging whether the first application is bound with a user-defined login page or not;

specifically, when the access request does not contain effective first identification information, namely the user to be logged in does not log in the micro service platform at present, the invention diversifies the login of the internal application of the micro service platform, so that the application in the micro service platform can self-define a login page, the self-defined login page can not be a default login page provided by the micro service platform, but the application of the self-defined login page is not bound, and the user can select to log in the micro service platform through the default login page of the micro service platform.

104. And if the first application is bound with a custom login page, skipping to the custom login page bound by the first application according to the address information of the bound custom login page, prompting a user to log in, executing the first application access request after the login is successful, and then generating effective first identification information to be stored in the browser.

Specifically, for the case that the first application has bound the custom login page, but the access request does not have valid first identification information, the access request can jump to the target page through the target page information stored inside the micro service platform and bound by the first application, so that the user logs in the micro service platform in the target page.

In this embodiment, a browser is used to receive a first application access request, the first application is integrated in the micro service platform, and determines whether the access request has valid first identifier information, the first identifier indicates a first application login status, when the first application is successfully logged in, storing the first application in a cookie of the browser, generating an access key issued by a platform to the first application in an encryption mode, if the access request does not contain valid first identification information, judging whether the first application is bound with a user-defined login page or not, if the first application is bound with the user-defined login page, skipping to the self-defined login page bound by the first application according to the address information of the bound self-defined login page, prompting the user to log in, and after the login is successful, executing the first application access request, and then generating effective first identification information to be stored in the browser. And judging whether the current access request is bound with a user-defined login page or not, so that the micro service platform can be logged in through the user-defined page, and the application login method of the micro service platform is diversified.

In this embodiment, based on the embodiment described in fig. 1, further description is made on a login situation without a first identifier and target page information, specifically referring to fig. 2, another embodiment of a method for accessing a micro service platform according to an embodiment of the present invention includes:

201. and if the first application is not bound with a self-defined login page, jumping to a second target page, wherein the second target page is a default login page provided by the micro service platform and is used for providing an account password login interface to log in the first application, executing the first application access request after login is successful, and generating effective first identification information to be stored in the browser.

Specifically, two situations may exist for an access request without valid first identification information and a login page that a first application does not bind to a user, the first situation is that a user to log in to a micro service platform logs in the micro service platform once, but the login page is not bound to the user in a self-defined manner, and then the user needs to log in through the login page provided by the micro service platform when accessing the micro service platform; the second is that a user to log in to the micro service platform never logs in to the micro service platform, and then for the first login situation, the user jumps to a default login page of the micro service platform, the login page can provide an account password login page for the user to log in, and for a user without an account, a corresponding registration option can be provided for the user to register an account.

In this embodiment, based on the embodiment shown in fig. 2, a further description is made of a case of logging in to a micro service platform through a system outside the micro service platform, specifically referring to fig. 3, where another embodiment of a method for accessing a micro service platform in an embodiment of the present invention includes:

301. jumping to a login system outside the platform according to the bound custom login page address;

specifically, if the to-be-accessed request does not contain the first identification information, that is, the current user login state is not logged in the micro service platform, it is determined whether the first application corresponding to the access request is bound with the self-defined login page, and if the self-defined login page is bound, the jump is performed according to the bound page address corresponding to the user stored in the micro service platform, and the jump is performed to the user-defined login system.

302. Receiving a first application access request sent by an off-platform login system, judging whether a request source address is consistent with a bound custom login page address, if so, confirming that login is successful, executing the first application access request, and generating effective first identification information by following an access key corresponding to a first application and storing the effective first identification information in a browser.

Specifically, the micro service platform jumps to a login system of a user to be logged in, receives an access request sent by the user to be logged in, judges whether a source address of the access request is consistent with a self-defined address bound by the user to be logged in the micro service platform or not through the access request, if so, confirms that the login is successful, jumps to a first application, generates effective first identification information and stores the effective first identification information into a browser of the user, so that the user can directly log in the first application in the next login within a certain time.

In this embodiment, based on the embodiment described in fig. 2, the number of hops of different pages is defined, specifically referring to fig. 4, another embodiment of a method for accessing a micro service platform in an embodiment of the present invention includes:

401. calculating the webpage jump times generated according to the first application access request;

specifically, the invention diversifies the login mode of the micro service platform, and enables a user to log in the application integrated in the micro service platform through a user-defined login page, but the application logged in the micro service platform through the user-defined login page increases the webpage jump times, which may cause the dead cycle of webpage jump under certain specific conditions.

402. Judging whether the webpage skipping times are larger than a preset threshold value or not;

specifically, by specifying a threshold value of the number of hops between web pages, web page hops with a number of hops below the threshold value are all considered as normal hops, and web page hops with a number of hops above the threshold value are considered as abnormal hops.

403. And if so, ending the webpage jump generated according to the first application access request.

When the webpage jump times generated according to an access request is lower than a preset jump threshold, the webpage jump is released, and when the webpage jump times generated according to an access request is higher than the preset jump threshold, the webpage jump generated according to the access request is stopped, and login failure is prompted, so that a user re-initiates an access request for the micro service platform.

In this embodiment, the number of times of jumping between web pages is calculated each time, so as to prevent an endless loop of jumping between web pages.

In this embodiment, based on the embodiment shown in fig. 1, after a user logs in a micro service platform, data of other applications may also be called, specifically referring to fig. 5, another embodiment of a method for accessing a micro service platform in an embodiment of the present invention includes:

501. receiving a service calling request sent by the first application, wherein the service calling request carries second identification information, and the second identification information is generated by encrypting calling information by an access key corresponding to the first application;

in this embodiment, a user who has logged in the micro service platform may call data of other applications through the micro service platform.

Specifically, because a plurality of applications exist in the microservice platform, if a user who has logged in a first application has corresponding authority, the user can call data of a second application, the user initiates a call request about data of the second application to the microservice platform through the first application, and after receiving the request, the microservice platform calls correspondingly according to a packet of the request. The second identification information is generated by encrypting calling information by an access key of the first application, and the calling information comprises: caller information, called application or service information, specific calling service information, and the like.

502. Judging whether second identification information carried in the service calling request sent by the first application is legal or not;

in this embodiment, after receiving a second application call request from a first application, the micro service platform may determine whether second identification information carried by the call request is legal, where the second identification information is used to indicate that the first application has a corresponding right to call data of the second application. Specifically, whether the second identification information carried by the calling request is legal or not can be judged to be the decryption of a key accessed by the first application, after the decryption is successful, information such as a login user and a calling interface can be obtained, whether the login user has the calling authority or not is confirmed according to prestored authority information corresponding to the information of the calling interface of the login user in the micro service platform, and if the second identification information carried by the calling request is legal or not, the second identification information carried by the calling request is judged.

503. If so, generating a calling request sent to the second application according to a service calling request sent by the first application, and receiving data sent by the second application;

specifically, when the micro service platform determines that the second identification information carried in the call request is legal, that is, the first application can call data of the second application, the call request sent to the second application is generated, the call request is sent to the second application, the second application sends corresponding data to the micro service platform according to the request after receiving the call request, and the micro service platform returns the data to the first application after receiving the data sent from the second application.

Specifically, in the calling process, the first application and the micro service platform are in encryption and decryption communication through the first application access key, and the micro service platform is in encryption and decryption communication through the access key corresponding to the second application in the process of communication with the second application service, so that account numbers and passwords do not need to be shared among applications mutually called, authentication by an authentication center does not need to be carried out additionally, the authentication process is saved, and the efficiency of calling and accessing among the applications is improved.

In the embodiment, the data call request is correspondingly processed by judging whether the call request sent by the first application contains corresponding identification information which can indicate the authority of the first application, so that data between different applications in the same micro service platform can be mutually called only by sending the call request to the micro service platform, the micro service platform carries out data call and sending operation according to the identification information contained in the call request, and compared with the prior art, the data call request also needs to be authenticated at the second application, the processing logic is simplified, and the efficiency is improved.

In this embodiment, based on the embodiment described in fig. 1, a further description is given of a case where an access request includes identification information, specifically referring to fig. 6, where another embodiment of a method for accessing a micro service platform in an embodiment of the present invention includes:

601. and if the access request contains the first identification information, jumping to the first application.

Specifically, the first identification information is a login identification, which indicates that a user to be logged in meets a direct login condition, and the condition may be that a target user has logged in the micro service platform through an account password within a certain time range when the login request is received, and the time range is adapted to a specific micro service platform.

The method in the embodiment of the present invention is introduced above, and the embodiment of the present invention is described below from the perspective of a virtual device.

Referring to fig. 7, a schematic diagram of an embodiment of a system for accessing a microservice platform according to an embodiment of the present invention includes:

a receiving unit 701, configured to receive, through a browser, a first application access request, where the first application is integrated in the microservice platform;

a determining unit 702, configured to determine whether the access request includes valid first identifier information, where the first identifier indicates a first application login status, is stored in a cookie of the browser when the first application login is successful, and is generated by encrypting an access key issued to the first application by the platform;

the determining unit 702 is further configured to determine whether the first application is bound with a custom login page if the access request does not include valid first identification information;

the processing unit 703 is configured to, if the first application is bound with a custom login page, jump to the custom login page bound to the first application according to the address information of the bound custom login page, prompt a user to log in, execute the first application access request after login is successful, and then generate effective first identification information to be stored in the browser.

Optionally, the processing unit 703 is further configured to:

and if the first application is not bound to the self-defined login page, jumping to a default login page provided by a micro service platform, providing an account password login interface to login the first application, executing the first application access request after login is successful, generating effective first identification information and storing the effective first identification information in the browser.

In this embodiment, the receiving unit 701 is configured to receive, by using a browser, a first application access request, where the first application is integrated in the micro service platform; a determining unit 702, configured to determine whether the access request includes valid first identifier information, where the first identifier indicates a first application login status, is stored in a cookie of the browser when the first application login is successful, and is generated by encrypting an access key issued to the first application by the platform; the determining unit 702 is further configured to determine whether the first application is bound with a custom login page if the access request does not include valid first identification information; the processing unit 703 is configured to, if the first application is bound with a custom login page, jump to the custom login page bound to the first application according to the address information of the bound custom login page, prompt a user to log in, execute the first application access request after login is successful, and then generate effective first identification information to be stored in the browser. Whether a first application corresponding to the access request is bound with a user-defined login page or not is judged according to the current access request, so that the micro-service platform can be logged in through the user-defined page, and diversification of the access method of the micro-service platform is realized.

Referring to fig. 8, a computer device in an embodiment of the present application is described below from the perspective of a physical device, where an embodiment of the computer device in the embodiment of the present application includes:

the computing device 800 may have a large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 801 (e.g., one or more processors) and a memory 805, where one or more applications or data are stored in the memory 805.

Memory 805 may be volatile storage or persistent storage, among others. The program stored in the memory 805 may include one or more modules, each of which may include a sequence of instructions for operating on the server. Still further, the central processor 801 may be configured to communicate with the memory 805 to execute a series of instruction operations in the memory 805 on the smart terminal 800.

The computer device 800 may also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input-output interfaces 804, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.

The processor 801 is specifically configured to process the following steps:

receiving a first application access request through a browser, wherein the first application is integrated in the micro service platform;

judging whether the access request has effective first identification information or not, wherein the first identification indicates the login state of a first application, is stored in a cookie of the browser when the login of the first application is successful, and is generated by encrypting an access key issued to the first application by a platform;

if the access request does not contain effective first identification information, judging whether the first application is bound with a user-defined login page or not;

and if the first application is bound with a custom login page, skipping to the custom login page bound by the first application according to the address information of the bound custom login page, prompting a user to log in, executing the first application access request after the login is successful, and then generating effective first identification information to be stored in the browser.

Optionally, if the first application is not bound to a custom login page, jumping to a second target page, where the second target page is a default login page provided by the micro service platform and is used to provide an account password login interface to log in the first application, execute the first application access request after login is successful, generate effective first identification information, and store the effective first identification information in the browser.

Optionally, if the login system corresponding to the user-defined login page bound to the first application confirms that the login system is the external system of the micro service platform, the user is prompted to log in by jumping to the user-defined login page bound to the first application, the first application access request is executed after the login is successful, and then effective first identification information is generated and stored in the browser, which specifically includes:

jumping to a login system outside the platform according to the bound custom login page address;

receiving a first application access request sent by an off-platform login system, judging whether a request source address is consistent with a bound custom login page address, if so, confirming that login is successful, executing the first application access request, and generating effective first identification information by following an access key corresponding to a first application and storing the effective first identification information in a browser.

Optionally, the method further comprises:

calculating the webpage jump times generated according to the first application access request;

judging whether the webpage skipping times are larger than a preset threshold value or not;

and if so, ending the webpage jump generated according to the first application access request.

Optionally, after logging in the first application according to the login option of the first target page, the method further includes:

receiving a service calling request sent by the first application, wherein the service calling request carries second identification information, and the second identification information is generated by encrypting login information by using an access key corresponding to the first application;

judging whether second identification information carried in the service calling request sent by the first application is legal or not;

if so, generating a calling request sent to the second application according to a service request sent by the first application, and receiving data sent by the second application;

the data is sent to a first application.

Optionally, if the access request includes first identification information, jumping to the first application.

It should be understood that, in the various embodiments of the present application, the sequence numbers of the above steps do not mean the execution sequence, and the execution sequence of the steps should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:报文修改的方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类