spring boot 1.5. 4. Integrate Shiro + CAS to realize single sign on and permission control

1. Add Maven dependency (install cas-server-3.5.2 first. Please refer to the article for the installation steps)

2. Add @ servletcomponentscan annotation after startup

3. Configure Shiro + CAS

4. Operation verification

Sign in

visit: http://localhost:8081/home

Jump to: https://localhost:8443/cas/login?service=http://localhost:8081/cas

Enter the correct user name and password to log in and jump back to: http://localhost:8081/cas?ticket=ST -203-GUheN64mOZec9IWZSH1B-cas01. example. org

Final jump back: http://localhost:8081/home

visit: http://localhost:8081/logout

Jump to: https://localhost:8443/cas/logout?service=http://localhost:8081

Since you are not logged in, you perform the login step again, so you finally return https://localhost:8443/cas/login?service=http://localhost:8081/cas

After this login is successful, return: http://localhost:8081/

visit: https://localhost:8443/cas/logout

Revisit: http://localhost:8081/home Will jump to the login page, perfect!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>