SingleSignOnEntrypublic class SingleSignOnEntry extends Object A class that represents entries in the cache of authenticated users.
This is necessary to make it available to
AuthenticatorBase subclasses that need it in order to perform
reauthentications when SingleSignOn is in use. |
Fields Summary |
---|
protected String | authType | protected String | password | protected Principal | principal | protected org.apache.catalina.Session[] | sessions | protected String | username | protected boolean | canReauthenticate |
Constructors Summary |
---|
public SingleSignOnEntry(Principal principal, String authType, String username, String password)Creates a new SingleSignOnEntry
// --------------------------------------------------------- Constructors
super();
updateCredentials(principal, authType, username, password);
| public SingleSignOnEntry()
|
Methods Summary |
---|
public synchronized void | addSession(SingleSignOn sso, org.apache.catalina.Session session)Adds a Session to the list of those associated with
this SSO.
for (int i = 0; i < sessions.length; i++) {
if (session == sessions[i])
return;
}
Session results[] = new Session[sessions.length + 1];
System.arraycopy(sessions, 0, results, 0, sessions.length);
results[sessions.length] = session;
sessions = results;
session.addSessionListener(sso);
| public synchronized org.apache.catalina.Session[] | findSessions()Returns the Session s associated with this SSO.
return (this.sessions);
| public java.lang.String | getAuthType()Gets the name of the authentication type originally used to authenticate
the user associated with the SSO.
return (this.authType);
| public boolean | getCanReauthenticate()Gets whether the authentication type associated with the original
authentication supports reauthentication.
return (this.canReauthenticate);
| public java.lang.String | getPassword()Gets the password credential (if any) associated with the SSO.
return (this.password);
| public java.security.Principal | getPrincipal()Gets the Principal that has been authenticated by
the SSO.
return (this.principal);
| public java.lang.String | getUsername()Gets the username provided by the user as part of the authentication
process.
return (this.username);
| public synchronized void | removeSession(org.apache.catalina.Session session)Removes the given Session from the list of those
associated with this SSO.
Session[] nsessions = new Session[sessions.length - 1];
for (int i = 0, j = 0; i < sessions.length; i++) {
if (session == sessions[i])
continue;
nsessions[j++] = sessions[i];
}
sessions = nsessions;
| public void | updateCredentials(java.security.Principal principal, java.lang.String authType, java.lang.String username, java.lang.String password)Updates the SingleSignOnEntry to reflect the latest security
information associated with the caller.
this.principal = principal;
this.authType = authType;
this.username = username;
this.password = password;
this.canReauthenticate =
(Constants.BASIC_METHOD.equals(authType)
|| Constants.FORM_METHOD.equals(authType));
|
|