Then, How will my application know that user is already logged in to the
system? The way we've to check is shown below? MyCredentialsRealm realm
= new MyCredentialsRealm(); DefaultSecurityManager securityManager
= new DefaultSecurityManager(realm); SimplePrincipalCollection
identity = new SimplePrincipalCollection(user.getUsername(), "realm");
Subject subject = new
Subject.Builder(securityManager).principals(identity).buildSubject();
// subject.hasRole("ADMIN"); if
(!subject.isAuthenticated()) { System.out.println("Is going to
log in to the system"); } else System.out.println("already logged
in");Please advise.
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/Shiro-for-authorization-permissions-only-tp7579436p7579449.html
Sent from the Shiro User mailing list archive at Nabble.com.