Class SingleSignOnEntry
- java.lang.Object
-
- org.apache.catalina.authenticator.SingleSignOnEntry
-
- Direct Known Subclasses:
HASingleSignOnEntry
public class SingleSignOnEntry extends Object
A class representing entries in the cache of authenticated users.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
authType
protected String
id
protected long
lastAccessTime
protected Principal
principal
Reset by HASingleSignOnEntryprotected String
realmName
protected Map<String,Session>
sessions
protected String
username
protected AtomicLong
version
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addSession(SingleSignOn sso, Session session)
Adds the given session to this SingleSignOnEntry if it does not already exist.void
expireSessions()
Expires all sessions associated with this SingleSignOnEntryString
getAuthType()
Gets the name of the authentication type originally used to authenticate the user associated with the SSO.String
getId()
Gets the id of this SSO entry.long
getLastAccessTime()
Principal
getPrincipal()
Gets thePrincipal
that has been authenticated by the SSO.String
getRealmName()
String
getUsername()
Gets the username provided by the user as part of the authentication process.long
getVersion()
Gets the id version of this SSO entrylong
incrementAndGetVersion()
boolean
isEmpty()
Returns true if this SingleSignOnEntry does not have any sessions associated with it, and false otherwise.void
removeSession(Session session)
void
setLastAccessTime(long lastAccessTime)
-
-
-
Field Detail
-
id
protected final String id
-
authType
protected final String authType
-
principal
protected Principal principal
Reset by HASingleSignOnEntry
-
username
protected final String username
-
realmName
protected final String realmName
-
lastAccessTime
protected long lastAccessTime
-
version
protected final AtomicLong version
-
-
Method Detail
-
addSession
public boolean addSession(SingleSignOn sso, Session session)
Adds the given session to this SingleSignOnEntry if it does not already exist.- Returns:
- true if the session was added, false otherwise
-
removeSession
public void removeSession(Session session)
-
isEmpty
public boolean isEmpty()
Returns true if this SingleSignOnEntry does not have any sessions associated with it, and false otherwise.- Returns:
- true if this SingleSignOnEntry does not have any sessions associated with it, and false otherwise
-
expireSessions
public void expireSessions()
Expires all sessions associated with this SingleSignOnEntry
-
getId
public String getId()
Gets the id of this SSO entry.
-
getVersion
public long getVersion()
Gets the id version of this SSO entry
-
getAuthType
public String 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"
-
getPrincipal
public Principal getPrincipal()
Gets thePrincipal
that has been authenticated by the SSO.
-
getUsername
public String getUsername()
Gets the username provided by the user as part of the authentication process.
-
getRealmName
public String getRealmName()
-
getLastAccessTime
public long getLastAccessTime()
-
setLastAccessTime
public void setLastAccessTime(long lastAccessTime)
-
incrementAndGetVersion
public long incrementAndGetVersion()
-
-