on-internet
← Community

Writing custom Shiro realm

Stack Overflow ·

I am constructing my own AuthorizingRealm subclass, and am having a tough time wiring it up to my SecurityManager. The essence of my realm: public class MyRealm extends AuthorizingRealm { protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { try { // My custom logic here } catch(Throwable t) { System.out.println(t.getMessage()); } SimpleAuthenticationInfo authn = new SimpleAuthenticationInfo(new MyUser(), "somePassword"); return authn; } protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { try { // My cu

Comments

Sign in or sign up to comment and upvote.

No comments yet.