public class FSLogoutUtil extends Object
Constructor and Description |
---|
FSLogoutUtil() |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
cleanSessionMap(String userDn,
String metaAlias,
FSSession session)
Cleans the
FSSessionManager maintained session
for the given principal. |
static void |
cleanSessionMapPartnerList(String userDN,
String currentEntityId,
String metaAlias,
FSSession session)
Cleans the
FSSessionManager maintained session
for the given principal, provider Id and removes all references to
the provider since logout notification has already been sent to
that provider. |
protected static boolean |
cleanSessionMapProviders(String userID,
Vector sessionList,
String metaAlias)
Cleans the
FSSessionManager maintained session
information for the user for the given list of sessions. |
protected static boolean |
destroyLocalSession(Object ssoToken,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Destroys local session.
|
protected static boolean |
destroyPrincipalSession(String userID,
String metaAlias,
String sessionIndex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Destroys the principal's session.
|
protected static HashMap |
getCurrentProvider(String userID,
String metaAlias)
Returns the information for the given principal and one of the live
connections (provider that received/issued assertion for this user)
including
sessionIndex , provider Id etc. |
static HashMap |
getCurrentProvider(String userID,
String metaAlias,
Object ssoToken) |
static HashMap |
getCurrentProvider(String userID,
String metaAlias,
Object ssoToken,
FSSession curSession) |
protected static FSAccountFedInfo |
getCurrentWorkingAccount(String userID,
String entityID,
String metaAlias)
Returns the
FSAccountFedInfo object for the given
principal and provider Id. |
protected static HashMap |
getLogoutGETProviders(String userID,
String entityId,
String sessionIndex,
String realm,
String metaAlias)
Returns the list of all providers who want to be
notified of logout using HTTP GET profile.
|
protected static Vector |
getSessionObjectList(String userDn,
String metaAlias,
String sessionIndex)
Gets the list of the principal's active sessionID
that is maintained by
FSSessionManager . |
static String |
getUserFromRequest(FSLogoutNotification reqLogout,
String realm,
String hostedEntityId,
String hostedRole,
com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig,
String metaAlias)
Determines the user name from the logout request.
|
protected static Object |
getValidToken(javax.servlet.http.HttpServletRequest request)
Retrieves the session token from the Http Request, and
validates the token with the OpenAM session manager.
|
static boolean |
isIDPInitiatedProfile(String profile)
Returns true if this is IDP initiated profiles, false otherwise.
|
static boolean |
liveConnectionsExist(String userID,
String metaAlias)
Finds out if there is at least one more partner who should be notified
of logout
|
static void |
removeCurrentSessionPartner(String metaAlias,
String remoteEntityId,
Object ssoToken,
String userID)
Removes current session partner from the session partner list.
|
static void |
removeTokenFromSession(Object token,
String metaAlias) |
protected static void |
returnToSource(javax.servlet.http.HttpServletResponse response,
com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor,
String bLogoutStatus,
String commonErrorPage,
int minorVersion,
com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig,
String hostedEntityId,
String userID)
Determines the return location and redirects based on
logout Return URL of the provider that sent the logout request.
|
protected static void |
sendErrorPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String providerAlias)
Returns the hosted provider's failure page to the user.
|
protected static boolean destroyPrincipalSession(String userID, String metaAlias, String sessionIndex, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
userID
- the principal whose session needs to be destroyedmetaAlias
- the hostedProvider's meta alias.sessionIndex
- Session Index of the user session.request
- HTTP Request Object.response
- HTTP Response Object.true
if session cleanup was successful;
false
otherwise.protected static boolean destroyLocalSession(Object ssoToken, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
ssoToken
- session of the principaltrue
if the local session is deleted;
false
otherwise.protected static Vector getSessionObjectList(String userDn, String metaAlias, String sessionIndex)
FSSessionManager
.userDn
- the principal whose session needs to be destroyedmetaAlias
- the hosted Entity doing logout cleanupsessionIndex
- index of the user's sessionpublic static void cleanSessionMapPartnerList(String userDN, String currentEntityId, String metaAlias, FSSession session)
FSSessionManager
maintained session
for the given principal, provider Id and removes all references to
the provider since logout notification has already been sent to
that provider.userDN
- the principal whose session needs to be destroyedcurrentEntityId
- the provider to whom logout notification is
about to be sentmetaAlias
- the hostedProvider doing logout cleanupsession
- Liberty session.protected static boolean cleanSessionMap(String userDn, String metaAlias, FSSession session)
FSSessionManager
maintained session
for the given principal. Logout notification has already been sent to all
providers that had live connections for this user
If FSSession
is null, then it cleans up the user's all
sessions.userDn
- the principal whose session needs to be destroyedmetaAlias
- the hostedProvider doing logout cleanupsession
- Liberty session.true
if session map cleaning was successful;
false
otherwise.protected static Object getValidToken(javax.servlet.http.HttpServletRequest request)
request
- HTTPServletRequest
object containing the
session cookie informationfalse
otherwise.protected static FSAccountFedInfo getCurrentWorkingAccount(String userID, String entityID, String metaAlias)
FSAccountFedInfo
object for the given
principal and provider Id.userID
- principal whose working account we want to retrieveentityID
- the provider Id to whom logout notification needs to
be sentmetaAlias
- hosted provider's meta aliasprotected static HashMap getCurrentProvider(String userID, String metaAlias)
sessionIndex
, provider Id etc.userID
- principal who needs to be logged outmetaAlias
- the hostedProvider doing logout cleanuppublic static HashMap getCurrentProvider(String userID, String metaAlias, Object ssoToken)
public static HashMap getCurrentProvider(String userID, String metaAlias, Object ssoToken, FSSession curSession)
public static boolean liveConnectionsExist(String userID, String metaAlias)
userID
- principal who needs to be logged outmetaAlias
- ther provider performing logouttrue
if any provider exists; false
otherwise.protected static boolean cleanSessionMapProviders(String userID, Vector sessionList, String metaAlias)
FSSessionManager
maintained session
information for the user for the given list of sessions.userID
- principal who needs to be logged outsessionList
- is the list of session Ids to be cleaned for the usermetaAlias
- the provider performing logouttrue
protected static HashMap getLogoutGETProviders(String userID, String entityId, String sessionIndex, String realm, String metaAlias)
userID
- principal who needs to be logged outentityId
- current provider who uses HTTP GET profile for logoutsessionIndex
- for the current providerrealm
- the realm in which the provider residesmetaAlias
- the hosted provider performing logoutpublic static String getUserFromRequest(FSLogoutNotification reqLogout, String realm, String hostedEntityId, String hostedRole, com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig, String metaAlias)
reqLogout
- the logout rerquest receivedrealm
- the realm under which the entity resideshostedEntityId
- the hosted provider performing logouthostedRole
- the role of the hosted providerhostedConfig
- extended meta config for hosted providermetaAlias
- hosted provider's meta aliasnull
otherwise.protected static void returnToSource(javax.servlet.http.HttpServletResponse response, com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor, String bLogoutStatus, String commonErrorPage, int minorVersion, com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig, String hostedEntityId, String userID)
protected static void sendErrorPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String providerAlias)
request
- the HttpServletRequest
objectresponse
- the HttpServletResponse
objectproviderAlias
- the provider alias corresponding to the hosted
providerpublic static void removeCurrentSessionPartner(String metaAlias, String remoteEntityId, Object ssoToken, String userID)
metaAlias
- meta alias of the hosted providerremoteEntityId
- id of the remote providerssoToken
- session object of the principal who presently loginuserID
- id of the principalpublic static boolean isIDPInitiatedProfile(String profile)
profile
- profile to be checked.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.