Extraction of the private inner class
into a package protected class. This is necessary to make it available to
subclasses that need it in order to perform
reauthentications when SingleSignOn is in use.
| Method from org.jboss.web.tomcat.tc4.authenticator.SingleSignOnEntry Detail: |
synchronized void addSession(SingleSignOn sso,
Session session) {
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);
}
Adds a Session to the list of those associated with
this SSO. |
synchronized Session[] findSessions() {
return (this.sessions);
}
Returns the Sessions associated with this SSO. |
String getAuthType() {
return (this.authType);
}
Gets the name of the authentication type originally used to authenticate
the user associated with the SSO. |
boolean getCanReauthenticate() {
return (this.canReauthenticate);
}
Gets whether the authentication type associated with the original
authentication supports reauthentication. |
String getPassword() {
return (this.password);
}
Gets the password credential (if any) associated with the SSO. |
Principal getPrincipal() {
return (this.principal);
}
Gets the Principal that has been authenticated by
the SSO. |
String getUsername() {
return (this.username);
}
Gets the username provided by the user as part of the authentication
process. |
synchronized void removeSession(Session session) {
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;
}
Removes the given Session from the list of those
associated with this SSO. |
void updateCredentials(Principal principal,
String authType,
String username,
String password) {
this.principal = principal;
this.authType = authType;
this.username = username;
this.password = password;
this.canReauthenticate =
(Constants.BASIC_METHOD.equals(authType)
|| Constants.FORM_METHOD.equals(authType));
}
Updates the SingleSignOnEntry to reflect the latest security
information associated with the caller. |