Search code examples
shiro

Bypass apache shiro authentication


How can I bypass Apache Shiro authentication and just use the authorization scheme. The reason I would like to achieve this is because I am using an in house SSO Authentication written for our cloud application and I would not like to save user information on our application server apart from basic user id and roles.


Solution

  • Implement custom realm (e.g. extend JdbcRealm class) and override doGetAuthenticationInfo and authenticate user within tthat method in any way you want. Of course depending on your authentication method you might have to modify the authorization bit as well (e.g. change the authorization query or even whole DB structure).