Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus of authentication, after being able to solve prior art use
The end unified management technological deficiency that identity token is big to rear end pressure, system implementations are complicated, and then realize that rear end only provides
Permissions data simplifies the process of rights management to front end, and rear end reaches front end and independently distribute without being monitored to page jump
The technical effect of permission, processing rendering more safe and convenient.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of displayed page for front end is provided
The method of authentication, comprising:
After reception logins successfully, the identity token of rear end return;
According to the identity token, authentication request is sent to the rear end;
Receive permission and routing that rear end returns;
According to the permission and routing, the displayed page of front end is rendered.
Optionally, according to the identity token, authentication request is sent to before the rear end, comprising:
Parameter in front-end configuration response blocker and request;
Wherein, the parameter in the request is used to that request header parameter secondary authentication to be arranged in authentication request;The response
Blocker whether there is identity token for checking to return in the request header parameter.
Optionally, it receives after logining successfully, after the identity token that rear end returns, comprising:
The identity token is stored to the local storage space of the front end or is updated in the local storage space
Through existing identity token.
Optionally, according to the permission and routing, the displayed page of front end is rendered, comprising:
According to the state supervisor in gradual frame, the permission and routing are parsed;
By the permission and routing after parsing, updates or store into state supervisor;
According to the permission and routing in state supervisor, the displayed page of front end is rendered;
Wherein, the parsing includes: to modify to routing data and/or be converted into custom instruction to permission.
Optionally, according to the permission and routing in state supervisor, the displayed page of front end is rendered, comprising:
The permission and routing after parsing in status register are called, to the routing dynamic carry;
According to the dynamic carry, the displayed page of front end after rendering.
Another aspect according to an embodiment of the present invention provides a kind of method of authentication applied to rear end, comprising:
Receive logging request;
According to the login domain, judge whether the log on request can succeed;If so, the successful message is returned
To front end, and cache the first identity token and its key that the logging request is included;If it is not, then returning to mistake;
Receive authentication request;
According to the Authentication domain and the key, the second identity token corresponding to the authentication request and described the are verified
Whether one identity token is consistent;
According to second identity token be compared with first identity token as a result, determine authenticating result.
Optionally, further includes: when the rear end, which receives, exits request, remove the first identity token in the caching and
Its key.
Optionally, before reception logging request, comprising:
The function and/or setting session control for configuring session control of forgoing intercept template.
Optionally, according to the login domain, before judging whether the logging request can succeed, comprising:
Using the filter in rear end, authenticates the identity token in the logging request and whether update or expired;
If so, failed authentication.
Optionally, according to the Authentication domain and the key, the second identity token corresponding to the authentication request is verified
It is whether consistent with first identity token, comprising:
It is determined as the second identity by the identity token in authentication request by parsing encryption using identity token adaptation
Token;
Second identity token is compared with the first identity token being stored in rear end, is judged whether consistent.
Optionally, it is authenticated according to what second identity token was compared with first identity token as a result, determining
As a result, comprising:
Trigger the identity token flush mechanism of filter;
The update of identity token is judged whether there is, if not and second identity token and first identity token one
It causes, then verifies the authentication request success.
Another aspect according to an embodiment of the present invention provides a kind of device that the displayed page for front end authenticates, packet
It includes:
Identity token receiving module, after being logined successfully for reception, the identity token of rear end return;
Authentication request sending module, for according to the identity token, authentication request to be sent to the rear end;
Respond module is received, for receiving the permission and routing of rear end return;
Page rendering module, for rendering the displayed page of front end according to the permission and routing.
Another aspect according to an embodiment of the present invention provides a kind of device of authentication applied to rear end, feature
It is, comprising:
Logging request receiving module, for receiving logging request;
Log on request judgment module, for judging whether the log on request can succeed according to the login domain;If so,
The successful message is then back to front end, and caches the first identity token that the logging request is included and its close
Key;If it is not, then returning to mistake;
Authentication request receiving module, for receiving authentication request;
Authentication request authentication module, for verifying corresponding to the authentication request according to the Authentication domain and the key
The second identity token and first identity token it is whether consistent;
Authenticating result determining module, for what is be compared according to second identity token with first identity token
As a result, determining authenticating result.
Another aspect according to an embodiment of the present invention provides a kind of system of authentication, comprising:
For front end displayed page authenticate device, and, the device of the authentication applied to rear end.
Other side according to an embodiment of the present invention provides a kind of authentication electronic equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes method for authenticating provided by the invention.
Still another aspect according to an embodiment of the present invention provides a kind of computer-readable medium, is stored thereon with calculating
Machine program realizes method for authenticating provided by the invention when described program is executed by processor.
One embodiment in foregoing invention have the following advantages that or the utility model has the advantages that
The technological means that the present invention is decoupled by front and back end utilizes front-end processing, management, the technology hand for storing identity token
Section solves the prior art using the rear end unified management technology that identity token is big to rear end pressure, system implementations are complicated
Defect, and then realize that rear end only provides permissions data to front end, simplifies the process of rights management, rear end be not necessarily to page jump into
Row monitoring reaches the technical effect that permission, processing rendering more safe and convenient are independently distributed in front end.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment
With explanation.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention
Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize
It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together
Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
During authentication, front-end and back-end two parts are related generally to.In order to enable simplify development process, it can be preceding
During rear end is developed, front and rear end is not depended on mutually, the degree of coupling of front and back end is reduced, so that the exploitation of front and rear end can
To carry out simultaneously, to reduce the development time, project development efficiency is improved.
Optionally, front end can complete the exhibition of AFE(analog front end) data using the tool (for example, MOCKJS) of AFE(analog front end) data
Show, rear end exploitation can more stress data processing and service logic, and then reach the technical effect for shortening the development time.
By separating the front and rear end of system, so that the more convenient extension of the framework of system, adaptable, flexibility ratio
The degree of coupling that is high, reducing front and back end utilizes system resource preferably.
By reducing the degree of coupling of the front end portion of system and rear end part, so that working as the system deployment in the cluster
When front and rear end part can be disposed respectively so that not influencing entire cluster when certain equipment delay machine in cluster
It operates normally, and then reaches the more reasonable technical effect of resource distribution.
Fig. 1 is the schematic diagram for the main flow that a kind of displayed page for front end according to an embodiment of the present invention authenticates, such as
Shown in Fig. 1, comprising:
Step S101, it receives after logining successfully, the identity token that rear end returns;
Step S102, according to the identity token, authentication request is sent to the rear end;
Step S103, permission and routing that rear end returns are received;
Step S104, according to the permission and routing, the displayed page of front end is rendered.
It the front end portion can be complete using the gradual frame (VUE.js frame) at the page interface of building data-driven
At above-mentioned steps.The routing can be dynamic routing, and specifically, the dynamic routing can be by the VUEX (condition managing of VUE
Device) and ROUTER (router) completion.
When user has initiated the request of login system, first can by it is described log in the system request be sent to rear end into
Row verifying.If being proved to be successful, the rear end can feed back the identity token of the user, that is, show to login successfully, still
When logining successfully, do not obtain the routing and corresponding permission of user also, it is also necessary to it is corresponding with rear end acquisition routing and
Corresponding permission.
The technological means that the present invention is decoupled by front and back end utilizes front-end processing, management, the technology hand for storing identity token
Section solves the prior art using the rear end unified management technology that identity token is big to rear end pressure, system implementations are complicated
Defect, and then realize that rear end only provides permissions data to front end, simplifies the process of rights management, rear end be not necessarily to page jump into
Row monitoring reaches the technical effect that permission, processing rendering more safe and convenient are independently distributed in front end.
Optionally, according to the identity token, authentication request is sent to before the rear end, comprising:
Parameter in front-end configuration response blocker and request may be implemented front end and be managed to request and response;
Wherein, the parameter in the request is used to that request header (HEADER) parameter secondary authentication to be arranged in authentication request,
It can be convenient by setting request header parameter and authenticated for other requests after login.
The response blocker is used to check in request header parameter described in the response returned with the presence or absence of identity token.If
There are identity tokens, then store the identity token to the local storage space of the front end (such as in browser
In cookie) or update already existing identity token in the local storage space.
Optionally, according to the permission and routing, the displayed page of front end is rendered, comprising:
Front end login page when jumping, routing monitoring carried out to the page, method used by monitoring can be with
For ROUTER.beforeEach method.According to the state supervisor (VUEX) in gradual frame, to the permission and route into
Row parsing;
By the permission and routing after parsing, updates or store into state supervisor;
According to the permission and routing in state supervisor, the displayed page of front end is rendered;
Wherein, parse to the permission and routing includes: to modify to routing data, convert permission to and make by oneself
Justice instructs and/or the state of permission is updated or is stored.
Specifically, the permission for completing parsing and routing can be stored in the state supervisor (state) of VUEX, in turn
The convenient time update in Status Change, and realize the global change of state.
This programme moves to the prior art in front end in the step of rear end parsing permission and routing, so that the calculating pressure of rear end
Power reduces, and prior art rear end is avoided to calculate the technological deficiency that pressure is big, logic is complicated.
Optionally, according to the permission and routing in state supervisor, the displayed page of front end is rendered, comprising:
The permission and routing after parsing in status register are called, to the routing dynamic carry;
According to the dynamic carry, the displayed page of front end after rendering.
The method for realizing dynamic carry can be ROUTER.addRoute.Wherein, the ROUTER.addRoute
It is the built-in method of VUE routing (vue-router), it acts as the corresponding routing permissions of calling the method addition, and then make
The page renders corresponding content according to the permission and is shown.
The detailed process for being applied to front end is described in detail with a specific embodiment below.
Fig. 2 is the schematic diagram for the detailed process that a kind of displayed page for front end according to an embodiment of the present invention authenticates.Such as
Shown in Fig. 2, comprising:
Step S201, the logging request of user is sent to rear end;
Step S202, user's logging request result information of rear end feedback is obtained;If the result information is successfully to log in,
It then obtains token and executes S203;If the result information is failure, the information of the login failure is shown in front end;
Step S203, the variation that routing is monitored using ROUTER.beforeEach method, requests the permission of user, triggers
VUEX;
Step S204, permission is routed using VUEX, and the routing after parsing is stored in state supervisor (state);
Step S205, routing dynamic carry, the exhibition of front end after being rendered are carried out according to ROUTER.addRoutes method
Show the page.
Fig. 3 is a kind of schematic diagram of the main flow of authentication applied to rear end according to an embodiment of the present invention.Such as Fig. 3 institute
Show, comprising:
Step S301, the logging request of user is received;
Step S302, it can use the filter (Filter) in rear end, authenticate the identity token in the logging request
Whether update or expired;If the identity token there is a situation where to update or is expired, failed authentication needs to receive use again
The logging request at family.The request logged in by the way that the filter is arranged to user, authenticated is uniformly processed, and assists front end to request
It is uniformly processed.
Step S303, according to the login domain (logging in Realm), judge whether the log on request succeeds;If so, will
The successful message is back to front end, and caches the first identity token and its key that the logging request is included;If
It is no, then return to mistake;
Step S304, authentication request is received;
Step S305, it according to the Authentication domain (authentication Realm) and the key, verifies corresponding to the authentication request
Whether the second identity token and first identity token are consistent;Step S306, according to second identity token and described the
It is that one identity token is compared as a result, determine authenticating result.
Wherein, step S302 is optional step.
By that will log in and authentication is respectively adopted and logs in domain and separately handle with Authentication domain, and using filter setting identity order
Board flush mechanism is further ensured that the safety of system so that identity token is not easy to be stolen.
During user logs in, filter only to identity token whether update with expired progress, without to logging in
Intercept process is done in request.Be determined that the identity token do not need to update and when there is no expired situation, by login field into
Row login process.Wherein, described log in domain can determine user using calling the login function of shiro frame to be judged
Whether successfully log in.If not succeeding, the information of mistake will be returned.Further include before error message is returned to front end,
The operation of processing is made a decision in the filter.
When logining successfully, identity token can be sent to front end, while the identity token being cached to rear end, used
It is operated in subsequent authentication.
Optionally, further includes: when the rear end, which receives, exits request, remove the first identity token in the caching and
Its key.
Due to JWT identity token once check out can continuously effective before the deadline, when control key just determines authentication
Whether succeed, ensure that back-end services safety.When user is in logging state, the identity is ceaselessly inputted in order to prevent and is enabled
The identity token can be stored in the caching of rear end by the key of board.
Key due to generating identity token be it is private, in the buffer, user log off when, needs record
The key of caching is removed, and then prevents to log in without key, reaches the technical effect of the safety of guarantee system.
Front end is responsible for voluntarily managing identity token, and then the technical program can be expanded to each platform, enhancing by realization
The cross-platform processing capacity of system.Therefore it is not necessarily to store identity token in rear end, that is, do not need the session control of storage user
Unique identification sessionID, identity token can be provided by front end, be solved in distributed type assemblies due to certain equipment breakdown
User identity token is lost, the technological means operated required for user is unable to complete.
Therefore optionally, before reception logging request, comprising:
Configuration forgo session control function (the Session function in the Shiro frame that needs to forgo in configuration, simultaneously
Shiro is set and intercepts template) and/or setting session control interception template (addition noSessionCreate parameter).
Shiro is made to will not continue to generate session function by aforesaid operations.
Optionally, according to the Authentication domain and the key, the second identity token corresponding to the authentication request is verified
It is whether consistent with first identity token, comprising:
It is determined as the second identity by the identity token in authentication request by parsing encryption using identity token adaptation
Token;
Second identity token is compared with the first identity token being stored in rear end, is judged whether consistent.
Authentication is requested, authentication request can enter by Filter entrance, trigger customized login and generate body
Part token., can be by judging whether the identity token is the customized token of system when entering in Authentication domain, and then reach
Screen the purpose of error token.
JWT identity token adaptation can also be used in Authentication domain, verify the identity token of this authentication request carrying
It is encrypted by the key of local cache, if be proved to be successful, triggers the flush mechanism of the identity token of filter, judged
Whether regenerate identity token and is sent to front end.
By above-mentioned technological means, can achieve prevents identity token from being falsely used, and more flexible control token uses
Technical effect.If authentication failed, handled in the method that uniformly fails into filter, and then ensure that Back end data safety
Property.
Optionally, it is authenticated according to what second identity token was compared with first identity token as a result, determining
As a result, comprising:
Trigger the identity token flush mechanism of filter;
The update of identity token is judged whether there is, if not and second identity token and first identity token one
It causes, then verifies the authentication request success.
By the way that the process of front-end and back-end to be respectively set, so that development process is more clear simplification, and then reach front and back
End exploitation can carry out simultaneously, and front end is not need to rely on rear end that analogue data displaying can be completed, and the exploitation of rear end is not necessarily to
It is concerned about in page processing and rendering, can be more concerned with the processing and service logic of data, and then reach simplified project development process,
Raising project total quality, reduces the technical effect of development time.
Since the framework decision systems of system obtain the process of permission, request authentication, by the way that front and back end is decoupled so that frame
The more convenient extension of structure design, can support multiple line upper mounting plates, more preferably cope with changeable business, either at mobile terminal or the end PC
It can authentication flexibly and fast.Front and back end unified plan is got rid of in terms of clustered deploy(ment), it can be achieved that front and back end is respectively independent
Deployment reduces accident series connection well and occurs, that is, do not influence entire business cluster in cluster the problem of a certain equipment, makes
Obtaining system resource can more fully utilize, and reach the Experience Degree for improving client, get rid of rear end and render slow technological deficiency, into
And reduce the front end page load time.And front and back end decoupling can make rear end be absorbed in processing data, promote each section
Performance, but also the maintenance of system is clearly easy.
The present invention is able to solve the problem of distributed deployment permission and request authentication, using front-end processing, manages and deposits
Respective identity is stored up, rather than is managed collectively by rear end, the pressure and complexity of rear end are alleviated.It is rendered by the permission of front end,
Simplify rights management process, rear end is only to provide a permissions data to front end, and remaining is by front end independent process permission point
Match, it is more safe and efficient.Page jump be not concerned about in rear end, is all to be distributed and managed according to permission oneself by front end to route.
Fig. 4 is a kind of schematic diagram of the detailed process of authentication applied to rear end according to an embodiment of the present invention.Such as Fig. 4 institute
Show, comprising:
Step S401, the logging request of user is obtained;
Step S402, whether updated or expired using the identity token in filter verifying logging request;
Step S403, according to the login domain, judge whether the log on request succeeds;If so, by described successful
Message is back to front end, and caches the first identity token and its key that the logging request is included;If it is not, then returning to mistake
Accidentally, failed authentication;
Step S404, according to the Authentication domain and the key, it is whether consistent that identity token is verified according to JWT;If so, holding
Row S405;If it is not, then failed authentication;
Step S405, filter flush mechanism is called, identity token is judged whether there is;If so, completing authentication;If
It is no, then fail.
Fig. 5 is the schematic diagram for the main modular that the displayed page according to an embodiment of the present invention for front end authenticates, such as Fig. 5 institute
Show, comprising:
Identity token receiving module 501, after being logined successfully for reception, the identity token of rear end return;
Authentication request sending module 502, for according to the identity token, authentication request to be sent to the rear end;
Respond module 503 is received, for receiving the permission and routing of rear end return;
Page rendering module 504, for rendering the displayed page of front end according to the permission and routing.
Fig. 6 is the schematic diagram of the main modular of the authentication according to an embodiment of the present invention applied to rear end, as shown in fig. 6,
Include:
Logging request receiving module 601, for receiving logging request;
Log on request judgment module 602, for judging whether the log on request can succeed according to the login domain;If
Be the successful message is then back to front end, and cache the first identity token that the logging request is included and its
Key;If it is not, then returning to mistake;
Authentication request receiving module 603, for receiving authentication request;
Authentication request authentication module 604, for it is right to verify the authentication request according to the Authentication domain and the key
Whether the second identity token answered and first identity token are consistent;
Authenticating result determining module 605, for being compared according to second identity token and first identity token
Pair as a result, determine authenticating result.
Another aspect according to an embodiment of the present invention provides a kind of system of authentication, comprising:
For front end displayed page authenticate device, and, the device of the authentication applied to rear end.
Fig. 7 is shown can be using the method for authenticating of the embodiment of the present invention or the exemplary system architecture 700 of authentication device.
As shown in fig. 7, system architecture 700 may include terminal device 701,702,703, network 704 and server 705.
Network 704 between terminal device 701,702,703 and server 705 to provide the medium of communication link.Network 704 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 701,702,703 and be interacted by network 704 with server 705, to receive or send out
Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 701,702,703
(merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 701,702,703 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 705 can be to provide the server of various services, such as utilize terminal device 701,702,703 to user
The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception
To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter
Breath -- merely illustrative) feed back to terminal device.
It should be noted that method for authenticating provided by the embodiment of the present invention is generally executed by server 705, correspondingly,
Authentication device is generally positioned in server 705.
It should be understood that the number of terminal device, network and server in Fig. 7 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 8, it illustrates the computer systems 800 for the terminal device for being suitable for being used to realize the embodiment of the present invention
Structural schematic diagram.Terminal device shown in Fig. 8 is only an example, function to the embodiment of the present invention and should not use model
Shroud carrys out any restrictions.
As shown in figure 8, computer system 800 includes central processing module (CPU) 801, it can be read-only according to being stored in
Program in memory (ROM) 802 or be loaded into the program in random access storage device (RAM) 803 from storage section 808 and
Execute various movements appropriate and processing.In RAM 803, also it is stored with system 800 and operates required various programs and data.
CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805 is also connected to always
Line 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.;
And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because
The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon
Computer program be mounted into storage section 808 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention
Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer
Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.In
In such embodiment, which can be downloaded and installed from network by communications portion 809, and/or from can
Medium 811 is dismantled to be mounted.When the computer program is executed by central processing module (CPU) 801, system of the invention is executed
The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet
It includes sending module, obtain module, determining module and first processing module.Wherein, the title of these modules is under certain conditions simultaneously
The restriction to the module itself is not constituted, for example, sending module is also described as " sending picture to the server-side connected
The module of acquisition request ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be
Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes
Obtaining the equipment includes: a kind of method that the displayed page for front end authenticates, specifically:
After reception logins successfully, the identity token of rear end return;
According to the identity token, authentication request is sent to the rear end;
Receive permission and routing that rear end returns;
According to the permission and routing, the displayed page of front end is rendered.
And/or provide a kind of method of authentication applied to rear end, comprising:
Receive logging request;
According to the login domain, judge whether the log on request can succeed;If so, the successful message is returned
To front end, and cache the first identity token and its key that the logging request is included;If it is not, then returning to mistake;
Receive authentication request;
According to the Authentication domain and the key, the second identity token corresponding to the authentication request and described the are verified
Whether one identity token is consistent;
According to second identity token be compared with first identity token as a result, determine authenticating result.
Technical solution according to an embodiment of the present invention, can achieve it is following the utility model has the advantages that
The technological means that the present invention is decoupled by front and back end utilizes front-end processing, management, the technology hand for storing identity token
Section solves the prior art using the rear end unified management technology that identity token is big to rear end pressure, system implementations are complicated
Defect, and then realize that rear end only provides permissions data to front end, simplifies the process of rights management, rear end be not necessarily to page jump into
Row monitoring reaches the technical effect that permission, processing rendering more safe and convenient are independently distributed in front end.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright
It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any
Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention
Within.