Now my project is common for springmvc + cas to realize single sign-on (sso), recently to achieve both before and after the separation, front end use vue. Js or presents. Js, but how to implement single sign-on feature has been unexpectedly solutions, have thought brother said or done,
CodePudding user response:
Before and after the end of the separation and single sign-on (sso) should not conflictCodePudding user response:
The session + redisCodePudding user response:
Use token, after landing successful generated token returned, save on the server, each request with a token,CodePudding user response:
The session + redis ~ ~CodePudding user response:
Login the sessionId saved to the database, and then write a filter or interceptors, verified the session on every request, the current sessionId and database to store the sessionId agree, release, or redirection or forwarding to the login page!CodePudding user response:
Front is responsible for providing captcha validation shows the back-end account password related interface then log in successfully issued a token for each subproject keys on itCodePudding user response:
Before and after the end of the separation: tomcat + nginx, mainly configuration, specific configuration have yourself feeling;Single sign-on: login center, through the session token, to determine whether the login, qualified and redirected to the login center does not conform to, this is a very simple idea, complex can see zheng single sign-on (sso) of the project, nginx configuration, don't match the wrong path, otherwise the session will be on different domains, each time, generate a dialogue,
CodePudding user response:
JWT + redis, can be used every time after the user login successfully carry token access,CodePudding user response:
The session + redisCodePudding user response: