Class DefaultSingleSignOnSession
- java.lang.Object
- 
- org.wildfly.security.http.util.sso.DefaultSingleSignOnSession
 
- 
- All Implemented Interfaces:
- AutoCloseable,- IdentityCache,- SingleSignOnSession
 
 public class DefaultSingleSignOnSession extends Object implements SingleSignOnSession SingleSignOnSessionthat delegates its persistence strategy to aSingleSignOnManager.SingleSignOnentries are created lazily in response toput(SecurityIdentity).
 This implementation supports single logout in order to invalidate local sessions for each participant of a single sign-on session, where participants represent the applications with active sessions associated with a given single sign-on session.- Author:
- Paul Ferraro
 
- 
- 
Field SummaryFields Modifier and Type Field Description private SingleSignOnSessionContextcontextprivate static StringLOGOUT_REQUEST_PARAMETERprivate ConcurrentMap<Boolean,SingleSignOn>mapprivate HttpServerRequestrequestprivate static StringSESSION_INVALIDATING_ATTRIBUTEprivate static BooleanSINGLE_SIGN_ON_KEYprivate Function<SecurityIdentity,SingleSignOn>ssoFactory
 - 
Constructor SummaryConstructors Constructor Description DefaultSingleSignOnSession(SingleSignOnSessionContext context, HttpServerRequest request, String mechanismName, boolean programmatic)DefaultSingleSignOnSession(SingleSignOnSessionContext context, HttpServerRequest request, SingleSignOn sso)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes any resources associated with this single sign-on session.CachedIdentityget()Returns an identity previously cached.private static CachedIdentitygetCachedIdentity(SingleSignOn sso)StringgetId()The identifier associated with this session.(package private) voidinvalidateLocalSession(HttpScope scope)booleanlogout()Performs a local logout if the incoming request is a logout message, otherwise do nothing.voidput(SecurityIdentity identity)Puts aSecurityIdentityinto the cache.CachedIdentityremove()Removes an identity from the cache.
 
- 
- 
- 
Field Detail- 
LOGOUT_REQUEST_PARAMETERprivate static final String LOGOUT_REQUEST_PARAMETER - See Also:
- Constant Field Values
 
 - 
SESSION_INVALIDATING_ATTRIBUTEprivate static final String SESSION_INVALIDATING_ATTRIBUTE 
 - 
SINGLE_SIGN_ON_KEYprivate static final Boolean SINGLE_SIGN_ON_KEY 
 - 
requestprivate final HttpServerRequest request 
 - 
mapprivate final ConcurrentMap<Boolean,SingleSignOn> map 
 - 
contextprivate final SingleSignOnSessionContext context 
 - 
ssoFactoryprivate final Function<SecurityIdentity,SingleSignOn> ssoFactory 
 
- 
 - 
Constructor Detail- 
DefaultSingleSignOnSessionpublic DefaultSingleSignOnSession(SingleSignOnSessionContext context, HttpServerRequest request, String mechanismName, boolean programmatic) 
 - 
DefaultSingleSignOnSessionpublic DefaultSingleSignOnSession(SingleSignOnSessionContext context, HttpServerRequest request, SingleSignOn sso) 
 
- 
 - 
Method Detail- 
getIdpublic String getId() Description copied from interface:SingleSignOnSessionThe identifier associated with this session.- Specified by:
- getIdin interface- SingleSignOnSession
- Returns:
- identifier associated with this session
 
 - 
getpublic CachedIdentity get() Description copied from interface:IdentityCacheReturns an identity previously cached.- Specified by:
- getin interface- IdentityCache
- Returns:
- the cached identity or nullif there is no identity in the cache
 
 - 
putpublic void put(SecurityIdentity identity) Description copied from interface:IdentityCachePuts aSecurityIdentityinto the cache.- Specified by:
- putin interface- IdentityCache
- Parameters:
- identity- the identity to cache (not- null)
 
 - 
removepublic CachedIdentity remove() Description copied from interface:IdentityCacheRemoves an identity from the cache.- Specified by:
- removein interface- IdentityCache
- Returns:
- the cached identity or nullif there is no identity in the cache
 
 - 
logoutpublic boolean logout() Description copied from interface:SingleSignOnSessionPerforms a local logout if the incoming request is a logout message, otherwise do nothing.- Specified by:
- logoutin interface- SingleSignOnSession
- Returns:
- trueif local session was invalidated. Otherwise,- false
 
 - 
closepublic void close() Description copied from interface:SingleSignOnSessionCloses any resources associated with this single sign-on session.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- SingleSignOnSession
 
 - 
invalidateLocalSessionvoid invalidateLocalSession(HttpScope scope) 
 - 
getCachedIdentityprivate static CachedIdentity getCachedIdentity(SingleSignOn sso) 
 
- 
 
-