Class SingleSignOnEntry
java.lang.Object
org.apache.catalina.authenticator.SingleSignOnEntry
- All Implemented Interfaces:
Serializable
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.- Author:
- B Stansberry, based on work by Craig R. McClanahan
- See Also:
-
Constructor Summary
ConstructorDescriptionSingleSignOnEntry
(Principal principal, String authType, String username, String password) Creates a new SingleSignOnEntry -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSession
(SingleSignOn sso, String ssoId, Session session) Adds aSession
to the list of those associated with this SSO.Returns the HTTP Session identifiers associated with this SSO.Gets the name of the authentication type originally used to authenticate the user associated with the SSO.boolean
Gets whether the authentication type associated with the original authentication supports reauthentication.Gets the password credential (if any) associated with the SSO.Gets thePrincipal
that has been authenticated by the SSO.Gets the user name provided by the user as part of the authentication process.void
removeSession
(Session session) Removes the givenSession
from the list of those associated with this SSO.void
updateCredentials
(Principal principal, String authType, String username, String password) Updates the SingleSignOnEntry to reflect the latest security information associated with the caller.
-
Constructor Details
-
SingleSignOnEntry
Creates a new SingleSignOnEntry- Parameters:
principal
- thePrincipal
returned by the latest call toRealm.authenticate
.authType
- the type of authenticator used (BASIC, CLIENT_CERT, DIGEST or FORM)username
- the username (if any) used for the authenticationpassword
- the password (if any) used for the authentication
-
-
Method Details
-
addSession
Adds aSession
to the list of those associated with this SSO.- Parameters:
sso
- TheSingleSignOn
valve that is managing the SSO session.ssoId
- The ID of the SSO session.session
- TheSession
being associated with the SSO.
-
removeSession
Removes the givenSession
from the list of those associated with this SSO.- Parameters:
session
- theSession
to remove.
-
findSessions
Returns the HTTP Session identifiers associated with this SSO.- Returns:
- The identifiers for the HTTP sessions that are current associated with this SSo entry
-
getAuthType
Gets the name of the authentication type originally used to authenticate the user associated with the SSO.- Returns:
- "BASIC", "CLIENT_CERT", "DIGEST", "FORM" or "NONE"
-
getCanReauthenticate
public boolean getCanReauthenticate()Gets whether the authentication type associated with the original authentication supports reauthentication.- Returns:
true
ifgetAuthType
returns "BASIC" or "FORM",false
otherwise.
-
getPassword
Gets the password credential (if any) associated with the SSO.- Returns:
- the password credential associated with the SSO, or
null
if the original authentication type does not involve a password.
-
getPrincipal
Gets thePrincipal
that has been authenticated by the SSO.- Returns:
- The Principal that was created by the authentication that triggered the creation of the SSO entry
-
getUsername
Gets the user name provided by the user as part of the authentication process.- Returns:
- The user name that was authenticated as part of the authentication that triggered the creation of the SSO entry
-
updateCredentials
public void updateCredentials(Principal principal, String authType, String username, String password) Updates the SingleSignOnEntry to reflect the latest security information associated with the caller.- Parameters:
principal
- thePrincipal
returned by the latest call toRealm.authenticate
.authType
- the type of authenticator used (BASIC, CLIENT_CERT, DIGEST or FORM)username
- the username (if any) used for the authenticationpassword
- the password (if any) used for the authentication
-