/* */ public Principal getUserPrincipal() /* */ { /* 2196 */ if ((this.userPrincipal instanceof GenericPrincipal)) { /* 2197 */ return ((GenericPrincipal)this.userPrincipal).getUserPrincipal(); /* */ } /* 2199 */ return this.userPrincipal; /* */ } /* */
/** * Return the principal that has been authenticated for this Request. */ @Override public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); } return userPrincipal; }
/** * Return the principal that has been authenticated for this Request. */ @Override public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); } return userPrincipal; }
/** * Return the principal that has been authenticated for this Request. */ @Override public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); } return userPrincipal; }
/** * Return the principal that has been authenticated for this Request. */ public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); } else { return (userPrincipal); } }
/** * Return the principal that has been authenticated for this Request. */ @Override public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); } return userPrincipal; }
/** * Return the principal that has been authenticated for this Request. */ @Override public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); } return userPrincipal; }
/** * Return the principal that has been authenticated for this Request. */ public Principal getUserPrincipal() { Principal principal = doGetUserPrincipal(); if (principal instanceof GenericPrincipal) { return ((GenericPrincipal) principal).getUserPrincipal(); } else { return (principal); } }
/** * Return the principal that has been authenticated for this Request. */ public Principal getUserPrincipal() { Principal principal = doGetUserPrincipal(); if (principal instanceof GenericPrincipal) { return ((GenericPrincipal) principal).getUserPrincipal(); } else { return (principal); } }
/** * Return the name of the remote user that has been authenticated * for this Request. */ public String getRemoteUser() { Principal principal = doGetUserPrincipal(); if (principal instanceof GenericPrincipal) { return ((GenericPrincipal) principal).getUserPrincipal().getName(); } else if (principal != null) { return (principal.getName()); } else { return (null); } }
public static void writePrincipal(GenericPrincipal p, ObjectOutput out) throws IOException { out.writeUTF(p.getName()); out.writeBoolean(p.getPassword()!=null); if ( p.getPassword()!= null ) out.writeUTF(p.getPassword()); String[] roles = p.getRoles(); if ( roles == null ) roles = new String[0]; out.writeInt(roles.length); for ( int i=0; i<roles.length; i++ ) out.writeUTF(roles[i]); boolean hasUserPrincipal = (p != p.getUserPrincipal() && p.getUserPrincipal() instanceof Serializable); out.writeBoolean(hasUserPrincipal); if (hasUserPrincipal) out.writeObject(p.getUserPrincipal()); }
public static void writePrincipal(GenericPrincipal p, ObjectOutput out) throws IOException { out.writeUTF(p.getName()); out.writeBoolean(p.getPassword()!=null); if ( p.getPassword()!= null ) out.writeUTF(p.getPassword()); String[] roles = p.getRoles(); if ( roles == null ) roles = new String[0]; out.writeInt(roles.length); for ( int i=0; i<roles.length; i++ ) out.writeUTF(roles[i]); boolean hasUserPrincipal = (p != p.getUserPrincipal() && p.getUserPrincipal() instanceof Serializable); out.writeBoolean(hasUserPrincipal); if (hasUserPrincipal) out.writeObject(p.getUserPrincipal()); }
public static SerializablePrincipal createPrincipal(GenericPrincipal principal) { if ( principal==null) return null; return new SerializablePrincipal(principal.getName(), principal.getPassword(), principal.getRoles()!=null?Arrays.asList(principal.getRoles()):null, principal.getUserPrincipal()!=principal?principal.getUserPrincipal():null); }
public static SerializablePrincipal createPrincipal(GenericPrincipal principal) { if ( principal==null) return null; return new SerializablePrincipal(principal.getName(), principal.getPassword(), principal.getRoles()!=null?Arrays.asList(principal.getRoles()):null, principal.getUserPrincipal()!=principal?principal.getUserPrincipal():null); }
String userPrincipalName = genPrincipal.getUserPrincipal().getName();
public void sessionEvent(SessionEvent event) { // We only care about session destroyed events if (!Session.SESSION_DESTROYED_EVENT.equals(event.getType()) && (!Session.SESSION_PASSIVATED_EVENT.equals(event.getType()))) return; // Look up the single session id associated with this session (if any) Session session = event.getSession(); GenericPrincipal principal = (GenericPrincipal) session.getPrincipal(); if (principal == null) return; session.setPrincipal(null); session.setAuthType(null); String username = principal.getUserPrincipal().getName(); Map<String, Session> map = userSessionMap.get(username); if (map == null) return; synchronized (map) { map.remove(session.getId()); if (map.isEmpty()) userSessionMap.remove(username); } } }
if( principal instanceof GenericPrincipal) { GenericPrincipal gp = (GenericPrincipal)principal; if(gp.getUserPrincipal() instanceof User) { principal = gp.getUserPrincipal();
if (gp.getUserPrincipal() instanceof User) { principal = gp.getUserPrincipal();
if (!principal.getUserPrincipal().getName().equals(samlSession.getPrincipal().getName())) { throw new RuntimeException("Unknown State");
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {