/** * Wrapper for ShiroUtils.getPrimaryPrincipal(Subject) */ public Object getPrimaryPrincipal() { return ShiroUtils.getPrimaryPrincipal(getSubject()); }
/** * Wrapper for ShiroUtils.getPrimaryPrincipal(Subject) */ public Object getPrimaryPrincipal() { return ShiroUtils.getPrimaryPrincipal(getSubject()); }
public static Serializable getUserId(Subject subject) { PortofinoRealm portofinoRealm = getPortofinoRealm(); Serializable principal = (Serializable) getPrimaryPrincipal(subject); if(portofinoRealm != null) { return portofinoRealm.getUserId(principal); } else { return principal; } }
public static Serializable getUserId(Subject subject) { PortofinoRealm portofinoRealm = getPortofinoRealm(); Serializable principal = (Serializable) getPrimaryPrincipal(subject); if(portofinoRealm != null) { return portofinoRealm.getUserId(principal); } else { return principal; } }
public Resolution authenticate() { Subject subject = SecurityUtils.getSubject(); context.getResponse().setStatus(401); context.getResponse().setHeader( AuthenticationRequiredResolution.LOGIN_PAGE_HEADER, context.getRequest().getRequestURL().toString()); if(subject.isRemembered()) { Serializable principal = (Serializable) ShiroUtils.getPrimaryPrincipal(subject); userName = getRememberedUserName(principal); rememberMe = true; return new ForwardResolution(getAuthenticationPage()); } else { return new ForwardResolution(getLoginPage()); } }