"SSM-based login authentication to achieve" the paper notes

"SSM-based login authentication to achieve" the paper notes

First, the basic information

  • Title: SSM-based login authentication to achieve

  • Source: Wuhan, Hubei Wuhan Vocational College of Software Engineering

  • Keywords: login authentication; Spring MVC; MyBatis

    Second, research

  1. Design ideas
    • In the design of the login function of time, if the client is a successful login, will be placed in a specific token data in the corresponding session, the client session but not logged in is this token data does not exist. The former is a resource request in handling client Based on this, login authentication basic idea, first determine whether there is a specific token data session, if there is to let the server continues to execute the request, otherwise the request will be intercepted, the customer end of page content to the login page.
  2. Login authentication interceptors to achieve
    • When a client request arrives at the server, SpringMVC configuration framework according to the method of the request interceptor preHandler processed. In this method, will first take the request object to the Uniform Resource Locator current request, the judge is not asking the login method "/login.action", if the request is to intercept login method is not required, because this time the client obvious a user is not logged in, it does not exist in its session token USER_INFO, if at this time to intercept the login page will jump to form an infinite loop operation. If not requested logon method, in which the interceptor code to get a token USER_INFO through the HttpSession object to determine whether the result is empty can know the current request client has not logged in, if not logged in to intercept, otherwise the server internal forwarding a way to return the login page.
  3. Log achieve
    - login authentication Another focus is to realize the function of login, the login function is responsible for the success of the login when the token is written in a user session, if there is no sign in this step interceptors can not work.

    CONCLUSIONS

  • Login authentication permissions system which is the most basic function, the core idea is intercepted by the interceptor login authentication request before the requested resource. In this ideology can be further extended complex access control functions, such as logged-on user must have specific permission to access to resources and so on.

## IV References

Guess you like

Origin www.cnblogs.com/clamye/p/12045433.html