List of usage examples for org.apache.shiro.authc SimpleAccount SimpleAccount
public SimpleAccount(PrincipalCollection principals, Object credentials)
From source file:org.geppetto.frontend.controllers.GeppettoRealm.java
License:Open Source License
@Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { IGeppettoDataManager dataManager = DataManagerHelper.getDataManager(); if (dataManager != null) { IUser user = dataManager.getUserByLogin((String) token.getPrincipal()); SimplePrincipalCollection principals = new SimplePrincipalCollection(user, getName()); SimpleAccount info = new SimpleAccount(principals, user.getPassword()); return info; }/*from www .j a v a 2s. co m*/ return null; }
From source file:org.obiba.opal.core.runtime.security.CookieAuthenticatingRealm.java
License:Open Source License
@Override protected AuthenticationInfo createtAuthenticationInfo(AuthenticationToken token, PrincipalCollection principals) { HttpCookieAuthenticationToken cookieToken = (HttpCookieAuthenticationToken) token; String urlHash = getUrlHash(cookieToken.getSessionId(), cookieToken.getUrl()); return new SimpleAccount(principals, urlHash); }
From source file:org.obiba.opal.core.runtime.security.HttpHeaderAuthenticatingRealm.java
License:Open Source License
@Override protected AuthenticationInfo createtAuthenticationInfo(AuthenticationToken token, PrincipalCollection principals) { return new SimpleAccount(principals, null); }
From source file:org.obiba.shiro.realm.CookieAuthenticatingRealm.java
License:Open Source License
@Override protected AuthenticationInfo createAuthenticationInfo(AuthenticationToken token, PrincipalCollection principals) { HttpCookieAuthenticationToken cookieToken = (HttpCookieAuthenticationToken) token; String urlHash = getUrlHash(cookieToken.getSessionId(), cookieToken.getUrl()); return new SimpleAccount(principals, urlHash); }
From source file:org.obiba.shiro.realm.HttpHeaderAuthenticatingRealm.java
License:Open Source License
@Override protected AuthenticationInfo createAuthenticationInfo(AuthenticationToken token, PrincipalCollection principals) { return new SimpleAccount(principals, null); }