Package com.sun.liberty
Class LibertyManager
- java.lang.Object
-
- com.sun.liberty.LibertyManager
-
public class LibertyManager extends Object
LibertyManagerforms the basis of the Public APIs. It has all the methods which the JSPs etc. need to use for federation/termination/logout etc.
-
-
Constructor Summary
Constructors Constructor Description LibertyManager()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleancheckNonce(String nonce, String user)Deprecated.This method has been deprecated.static StringcleanQueryString(jakarta.servlet.http.HttpServletRequest request)static FSAccountFedInfogetAccountFedInfo(jakarta.servlet.http.HttpServletRequest request, String entityID)Deprecated.This method is deprecated.static FSAccountFedInfogetAccountFedInfo(jakarta.servlet.http.HttpServletRequest request, String realm, String entityID, String providerRole)Returns the federation information associated with current liberty session.static IteratorgetAllIDPList(String realm)Returns a list of all trusted Identity Providers under the realm.static IteratorgetAllSPList(String realm)Returns a list of all trusted Service Providers under the realm.static StringgetAuthnContext(jakarta.servlet.http.HttpServletRequest request, String entityID)Deprecated.This method is deprecated.static StringgetAuthnContext(jakarta.servlet.http.HttpServletRequest request, String realm, String entityID)Returns the authentication context used in liberty single sign-on.static StringgetAuthnRequestEnvelope(jakarta.servlet.http.HttpServletRequest request)Returns Authentication Request Envelope from a HTTP servlet request.static StringgetConsentHandlerURL(jakarta.servlet.http.HttpServletRequest request)Returns theConsentHandler.static StringgetCOTKey()Returns theCOTkey fromIFSConstants.static ListgetDiscoveryBootStrapCredentials(jakarta.servlet.http.HttpServletRequest request, String providerID)Deprecated.This method has been deprecated.static ListgetDiscoveryBootStrapCredentials(jakarta.servlet.http.HttpServletRequest request, String providerID, String providerRole)Returns the Discovery Service Credentials in the Advice element.static NodeListgetDiscoveryBootStrapResourceOfferings(jakarta.servlet.http.HttpServletRequest request, String providerID)Deprecated.This method has been deprecated.static NodeListgetDiscoveryBootStrapResourceOfferings(jakarta.servlet.http.HttpServletRequest request, String providerID, String providerRole)Returns the Discovery Service Resource Offerings nodes in an attribute statement.static StringgetEntityID(String metaAlias)ReturnsentityIDfrom the provider Alias usingmeta managercalls.static StringgetErrorPageURL(String providerId, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecated.static StringgetErrorPageURL(String realm, String providerId, String providerRole, jakarta.servlet.http.HttpServletRequest request)Returns the provider's error page.static SetgetFederatedProviders(String userName, String hostProviderId, String hostProviderRole)Deprecated.This method is deprecated.static SetgetFederatedProviders(String userName, String realm, String hostProviderId, String hostProviderRole)Returns the set of federated providers for an user using Account Management API.static StringgetFederationDonePageURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecated.static StringgetFederationDonePageURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecated.static StringgetFederationHandlerURL(jakarta.servlet.http.HttpServletRequest request)Returns theFederationHandler.static StringgetFedErrorKey()Returns Federation Error Key.static StringgetFedRemarkKey()ReturnsFederationRemarkKey.static StringgetHomeURL(String providerID, String providerRole)Deprecated.This method is deprecated.static StringgetHomeURL(String realm, String providerID, String providerRole)Returns Provider'sHomePageURL.static booleangetIDPFederationStatus(String user, String remoteEntityId, String hostedEntityId, String hostedProviderRole)Deprecated.This method is deprecated.static booleangetIDPFederationStatus(String user, String realm, String remoteEntityId, String hostedEntityId, String hostedProviderRole)Returns the federation status of a user with an Identity Provider.static IteratorgetIDPList()Deprecated.This method has been deprecated.static IteratorgetIDPList(String hostedEntityID)Deprecated.This method is deprecated.static IteratorgetIDPList(String realm, String hostedEntityID)Returns a list of all trusted Identity Providers under the realm for a given hosted provider's entity ID.static StringgetInterSiteURL(jakarta.servlet.http.HttpServletRequest request)Returns theinterSiteURLfromIFSConstants.static StringgetIntroducedProvider(jakarta.servlet.http.HttpServletRequest request)Returns the ID of the provider discovered via the introduction protocol.static StringgetLECPContentType()Returns Liberty-enabled client and proxy profile HTTP content type.static StringgetLECPHeaderName()Returns Liberty-enabled client and proxy profile HTTP header name.static SetgetListOfCOTs(String providerId, String providerRole)Deprecated.This method is deprecated.static SetgetListOfCOTs(String realm, String providerId, String providerRole)Returns the List of COTs for the given Provider under a realm.static StringgetLoginURL(jakarta.servlet.http.HttpServletRequest request)Returns theLoginURLfromIFSConstants.static StringgetLRURLKey()Returns theLRURLKeyfromIFSConstants.static NameIdentifiergetMappedNameIdentifier(String hostedSPMetaAlias, Object ssoToken, String remoteSPEntityID)ReturnsNameIdentifierbetween the IDP and the other SP for the same principal.static StringgetMetaAlias(String providerID, String providerRole)Deprecated.This method is deprecated bygetMetaAlias(String,String,String).static StringgetMetaAlias(String realm, String providerID, String providerRole)ReturnsmetaAliasfrom provider ID under a realm.static StringgetMetaAliasKey()Returns themetaAliasKeyfromIFSConstants.static StringgetNameRegistrationDonePageURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecated.static StringgetNameRegistrationDonePageURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Returns the NameRegistrationDonePageURLfrom theproviderIDunder a realm.static StringgetNameRegistrationProviderIDKey()Returns name registration provider ID key.static StringgetNameRegistrationURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecated.static StringgetNameRegistrationURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)ReturnsNameRegistrationURL.static StringgetNewRequest(jakarta.servlet.http.HttpServletRequest request)Creates New Request ID from theHttpRequestServlet.static StringgetNonce(String user)Deprecated.This method has been deprecated.static StringgetPreLoginServletURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecated.static StringgetPreLoginServletURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)ReturnsPreLoginServletURL and appendsmetaAliasto it.static StringgetProviderIDKey()Returns theproviderIDKeyfromIFSConstants.static StringgetProviderRole(String metaAlias)ReturnsproviderRolefrom theProviderAliasusingmeta Mgmtcalls.static SetgetProvidersToFederate(String providerID, String providerRole, String userName)Deprecated.This method is deprecated.static SetgetProvidersToFederate(String realm, String providerID, String providerRole, String userName)Returns the list of all Trusted Identity Providers of this user not already federated with.static StringgetRealmByMetaAlias(String metaAlias)Returns the realm by parsing the metaAlias.static SetgetRegisteredProviders(String userName, String hostProviderId, String providerRole)Deprecated.This method is deprecated.static SetgetRegisteredProviders(String userName, String realm, String hostProviderId, String providerRole)Returns registered providers of an user.static StringgetRequestIDKey()Returns therequestIDKeyfromIFSConstants.static StringgetSelectedProviderKey()Returns theselectedProviderKeyfromIFSConstants.static booleangetSPFederationStatus(String user, String remoteProviderId, String hostedProviderId, String hostedProviderRole)Deprecated.This method is deprecated.static booleangetSPFederationStatus(String user, String realm, String remoteProviderId, String hostedProviderId, String hostedProviderRole)Returns the federations status of a user with an Service Provider.static IteratorgetSPList()Deprecated.This method is deprecated.static IteratorgetSPList(String hostedEntityID)Deprecated.This method is deprecated.static IteratorgetSPList(String realm, String hostedEntityID)Returns a list of all trusted Service Providers for this Hosted Provider.static StringgetSuccinctID(String entityID)Deprecated.This method has been deprecated.static StringgetSuccinctID(String providerID, String providerRole)Returns succinct ID of a provider.static StringgetTerminationDonePageURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecatedstatic StringgetTerminationDonePageURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Returns theTerminationDonePageURLfrom the provider ID under a realm.static StringgetTerminationProviderIDKey()Returns the terminationproviderIDKeyfromIFSConstants.static StringgetTerminationURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Deprecated.This method is deprecatedstatic StringgetTerminationURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)Returns Termination URL.static StringgetUser(jakarta.servlet.http.HttpServletRequest request)Returns the user fromHttpServletRequest.static booleanisFederationCancelled(jakarta.servlet.http.HttpServletRequest request)Returns true if Federation is cancelled.static booleanisLECPProfile(jakarta.servlet.http.HttpServletRequest request)Determines if a HTTP servlet request is Liberty-enabled client and proxy profile.static booleanisLogoutSuccess(jakarta.servlet.http.HttpServletRequest request)Returns true if logout succeeded.static booleanisNameRegistrationCancelled(jakarta.servlet.http.HttpServletRequest request)Returns true if name registration is cancelled.static booleanisNameRegistrationSuccess(jakarta.servlet.http.HttpServletRequest request)Returns true if name registration succeeds.static booleanisTerminationCancelled(jakarta.servlet.http.HttpServletRequest request)Returns true if termination is cancelled.static booleanisTerminationSuccess(jakarta.servlet.http.HttpServletRequest request)Returns true if Termination succeeds.static booleansetAuthnRequest(FSAuthnRequest request, String entityID)Deprecated.This method is deprecated.static booleansetAuthnRequest(FSAuthnRequest request, String realm, String entityID)Sets the authentication request to be sent to identity provider.
-
-
-
Method Detail
-
getIDPList
public static Iterator getIDPList()
Deprecated.This method has been deprecated. Please usegetAllIDPList(String realm)instead.Returns a list of all trusted Identity Providers under root realm.- Returns:
- an iterator to a list of strings, each containing the entity ID of Identity Providers.
- See Also:
getAllIDPList(String)
-
getAllIDPList
public static Iterator getAllIDPList(String realm)
Returns a list of all trusted Identity Providers under the realm.- Parameters:
realm- The realm under which the entity resides.- Returns:
- an iterator to a list of strings, each containing the entity ID of Identity Providers.
-
getIDPList
public static Iterator getIDPList(String hostedEntityID)
Deprecated.This method is deprecated. Please usegetIDPList(String,String)Returns a list of all trusted Identity Providers under root realm for a given hosted provider's entity ID.- Parameters:
hostedEntityID- hosted provider's entity ID.- Returns:
- an iterator to a list of strings, each containing the provider ID of an trusted Identity Provider for this hosted provider.
- See Also:
getIDPList(String,String)
-
getIDPList
public static Iterator getIDPList(String realm, String hostedEntityID)
Returns a list of all trusted Identity Providers under the realm for a given hosted provider's entity ID.- Parameters:
realm- The realm under which the entity resides.hostedEntityID- hosted provider's entity ID.- Returns:
- an iterator to a list of strings, each containing the provider ID of an trusted Identity Provider for this hosted provider.
-
getSPList
public static Iterator getSPList()
Deprecated.This method is deprecated. Please usegetAllSPList(String realm).Returns a list of all trusted Service Providers under root realm.- Returns:
- an iterator to a list of strings, each containing the entity ID of a Service Provider.
- See Also:
getAllSPList(String)
-
getAllSPList
public static Iterator getAllSPList(String realm)
Returns a list of all trusted Service Providers under the realm.- Parameters:
realm- The realm under which the entity resides.- Returns:
- an iterator to a list of strings, each containing the entity ID of a Service Provider.
-
getSPList
public static Iterator getSPList(String hostedEntityID)
Deprecated.This method is deprecated. Please usegetSPList(String,String)Returns a list of all trusted Service Providers under root realm for this Hosted Provider.- Parameters:
hostedEntityID- hosted provider's entity ID.- Returns:
- an iterator to a list of strings, each containing the entity ID of an Service Provider for the given Hosted Provider.
- See Also:
getSPList(String,String)
-
getSPList
public static Iterator getSPList(String realm, String hostedEntityID)
Returns a list of all trusted Service Providers for this Hosted Provider.- Parameters:
realm- The realm under which the entity resides.hostedEntityID- hosted provider's entity ID.- Returns:
- an iterator to a list of strings, each containing the entity ID of an Service Provider for the given Hosted Provider.
-
getIDPFederationStatus
public static boolean getIDPFederationStatus(String user, String remoteEntityId, String hostedEntityId, String hostedProviderRole)
Deprecated.This method is deprecated.Returns the federation status of a user with an Identity Provider. This method assumes that the user is already federated with the provider.- Parameters:
user- The user name obtained by callinggetUser()on a Liberty-authenticatedHttpServletRequestfrom the userremoteEntityId- Entity ID of the Remote Identity Provider.hostedEntityId- Hosted Provider's entity ID.hostedProviderRole- Hosted Provider's Role.- Returns:
- The federation status of a user with an Identity Provider.
- See Also:
getIDPFederationStatus(String,String,String,String)
-
getIDPFederationStatus
public static boolean getIDPFederationStatus(String user, String realm, String remoteEntityId, String hostedEntityId, String hostedProviderRole)
Returns the federation status of a user with an Identity Provider. This method assumes that the user is already federated with the provider.- Parameters:
user- The user name obtained by callinggetUser()on a Liberty-authenticatedHttpServletRequestfrom the userrealm- The realm under which the entity resides.remoteEntityId- Entity ID of the Remote Identity Provider.hostedEntityId- Hosted Provider's entity ID.hostedProviderRole- Hosted Provider's Role.- Returns:
- The federation status of a user with an Identity Provider.
-
getSPFederationStatus
public static boolean getSPFederationStatus(String user, String remoteProviderId, String hostedProviderId, String hostedProviderRole)
Deprecated.This method is deprecated.Returns the federations status of a user with an Service Provider. This method assumes that the user is already federated with the provider.- Parameters:
user- The user name obtained by callinggetRemoteUser()on a Liberty-authenticatedHttpServletRequestfrom the user.remoteProviderId- The entity ID of the Remote Service Provider.hostedProviderId- Hosted provider's entity ID.hostedProviderRole- Hosted Provider Role.- Returns:
- The federation status of a user with an Service Provider.
- See Also:
getSPFederationStatus(String,String,String,String,String)
-
getSPFederationStatus
public static boolean getSPFederationStatus(String user, String realm, String remoteProviderId, String hostedProviderId, String hostedProviderRole)
Returns the federations status of a user with an Service Provider. This method assumes that the user is already federated with the provider.- Parameters:
user- The user name obtained by callinggetRemoteUser()on a Liberty-authenticatedHttpServletRequestfrom the user.realm- The relam under which the entity resides.remoteProviderId- The entity ID of the Remote Service Provider.hostedProviderId- Hosted provider's entity ID.hostedProviderRole- Hosted Provider Role.- Returns:
- The federation status of a user with an Service Provider.
-
getNonce
public static String getNonce(String user)
Deprecated.This method has been deprecated. Please use other means to generate nounce.Returns a nonce for use in forms to be posted to well known servlets. Avoids cross site scripting type attacks.- Parameters:
user- The user obtained by callinggetRemoteUser()on a Liberty-authenticatedHttpServletRequestfrom the user.- Returns:
- A string to be put in a hidden form field called "nonce".
-
checkNonce
public static boolean checkNonce(String nonce, String user)
Deprecated.This method has been deprecated. Please use other means to verify nounce.Checks that the given nonce is the same as the last one returned viagetNonce(), and invalidates it.- Parameters:
nonce- String containing nonce.user- User name passed togetNonceto obtain nonce.- Returns:
- true is
nonceis the same as the last one returned bygetNoncemethod.
-
getIntroducedProvider
public static String getIntroducedProvider(jakarta.servlet.http.HttpServletRequest request)
Returns the ID of the provider discovered via the introduction protocol. Ifnull, no provider was discovered. Can be passed toLoginServletifnull.- Parameters:
request- HTTP servlet request.- Returns:
- the provider ID
-
getMetaAliasKey
public static String getMetaAliasKey()
Returns themetaAliasKeyfromIFSConstants.- Returns:
- the
metaAliasKeyfromIFSConstants.
-
getTerminationProviderIDKey
public static String getTerminationProviderIDKey()
Returns the terminationproviderIDKeyfromIFSConstants.- Returns:
- the termination
providerIDKeyfromIFSConstants.
-
getRequestIDKey
public static String getRequestIDKey()
Returns therequestIDKeyfromIFSConstants.- Returns:
- the
requestIDKeyfromIFSConstants.
-
getProviderIDKey
public static String getProviderIDKey()
Returns theproviderIDKeyfromIFSConstants.- Returns:
- the
providerIDKeyfromIFSConstants.
-
getLRURLKey
public static String getLRURLKey()
Returns theLRURLKeyfromIFSConstants.- Returns:
- the
LRURLKeyfromIFSConstants.
-
getCOTKey
public static String getCOTKey()
Returns theCOTkey fromIFSConstants.- Returns:
- the
COTkey fromIFSConstants.
-
getSelectedProviderKey
public static String getSelectedProviderKey()
Returns theselectedProviderKeyfromIFSConstants.- Returns:
- the
selectedProviderKeyfromIFSConstants.
-
getFedErrorKey
public static String getFedErrorKey()
Returns Federation Error Key.- Returns:
- Federation Error Key
-
getFedRemarkKey
public static String getFedRemarkKey()
ReturnsFederationRemarkKey.- Returns:
FederationRemarkKey
-
getUser
public static String getUser(jakarta.servlet.http.HttpServletRequest request)
Returns the user fromHttpServletRequest.- Parameters:
request- HTTP servlet request.- Returns:
- the user from
HttpServletRequest.
-
getHomeURL
public static String getHomeURL(String providerID, String providerRole)
Deprecated.This method is deprecated.Returns Provider'sHomePageURL.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.- Returns:
- Provider's
HomePageURL. - See Also:
getHomeURL(String,String,String)
-
getHomeURL
public static String getHomeURL(String realm, String providerID, String providerRole)
Returns Provider'sHomePageURL.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.- Returns:
- Provider's
HomePageURL.
-
getPreLoginServletURL
public static String getPreLoginServletURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecated.ReturnsPreLoginServletURL and appendsmetaAliasto it.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
PreLoginServletURL and appendsmetaAliasto it.- See Also:
getPreLoginServletURL(String,String,String,HttpServletRequest)
-
getPreLoginServletURL
public static String getPreLoginServletURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
ReturnsPreLoginServletURL and appendsmetaAliasto it.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
PreLoginServletURL and appendsmetaAliasto it.
-
getLoginURL
public static String getLoginURL(jakarta.servlet.http.HttpServletRequest request)
Returns theLoginURLfromIFSConstants.- Parameters:
request- HTTP servlet request.- Returns:
- the
LoginURLfromIFSConstants
-
getInterSiteURL
public static String getInterSiteURL(jakarta.servlet.http.HttpServletRequest request)
Returns theinterSiteURLfromIFSConstants.- Parameters:
request- HTTP servlet request.- Returns:
- the
interSiteURLfromIFSConstants.
-
getEntityID
public static String getEntityID(String metaAlias)
ReturnsentityIDfrom the provider Alias usingmeta managercalls.- Parameters:
metaAlias- ThemetaAliasof the provider- Returns:
entityIDcorresponding to themetaAlias.
-
getProvidersToFederate
public static Set getProvidersToFederate(String providerID, String providerRole, String userName)
Deprecated.This method is deprecated. Please usegetProvidersToFederate(String, String, String,String)Returns the list of all Trusted Identity Providers of this user not already federated with. This is a subset of the Set returned bygetIDPList(). This method is used to show the drop-down menu consisting of all the Identity Providers that the user is not already federated with.- Parameters:
providerID- provider's entity ID.providerRole- provider Role.userName- name of user.- Returns:
- Set containing all the Identity Provider IDs which the user is not already federated with.
- See Also:
getProvidersToFederate(String,String,String,String)
-
getProvidersToFederate
public static Set getProvidersToFederate(String realm, String providerID, String providerRole, String userName)
Returns the list of all Trusted Identity Providers of this user not already federated with. This is a subset of the Set returned bygetIDPList(). This method is used to show the drop-down menu consisting of all the Identity Providers that the user is not already federated with.- Parameters:
realm- the realm that the provider residesproviderID- provider's entity ID.providerRole- provider Role.userName- name of user.- Returns:
- Set containing all the Identity Provider IDs which the user is not already federated with.
-
getFederatedProviders
public static Set getFederatedProviders(String userName, String hostProviderId, String hostProviderRole)
Deprecated.This method is deprecated.Returns the set of federated providers for an user using Account Management API.- Parameters:
userName- for which the federated providers are to be returned.hostProviderId- Hosted provider's entity ID.hostProviderRole- Hosted Provider Role.- Returns:
- federated providers a Set containing the provider IDs of
federated providers for the given
userName. - See Also:
getFederatedProviders(String, String, String, String)
-
getFederatedProviders
public static Set getFederatedProviders(String userName, String realm, String hostProviderId, String hostProviderRole)
Returns the set of federated providers for an user using Account Management API.- Parameters:
userName- for which the federated providers are to be returned.realm- The realm under which the entity resides.hostProviderId- Hosted provider's entity ID.hostProviderRole- Hosted Provider Role.- Returns:
- federated providers a Set containing the provider IDs of
federated providers for the given
userName.
-
getListOfCOTs
public static Set getListOfCOTs(String providerId, String providerRole)
Deprecated.This method is deprecated.Returns the List of COTs for the given Provider under root realm.- Parameters:
providerId- The ID of the provider whoseCOTListis to be foundproviderRole- The Role of the provider whoseCOTListis to be found- Returns:
- The set containing the authentication domains for the given provider.
- See Also:
getListOfCOTs(String,String,String)
-
getListOfCOTs
public static Set getListOfCOTs(String realm, String providerId, String providerRole)
Returns the List of COTs for the given Provider under a realm.- Parameters:
realm- The realm under which the entity resides.providerId- The ID of the provider whoseCOTListis to be foundproviderRole- The Role of the provider whoseCOTListis to be found- Returns:
- The set containing the authentication domains for the given provider.
-
getMetaAlias
public static String getMetaAlias(String providerID, String providerRole)
Deprecated.This method is deprecated bygetMetaAlias(String,String,String).ReturnsmetaAliasfrom provider ID under root realm.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.- Returns:
metaAliasfrom provider ID- See Also:
getMetaAlias(String,String,String)
-
getMetaAlias
public static String getMetaAlias(String realm, String providerID, String providerRole)
ReturnsmetaAliasfrom provider ID under a realm.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.- Returns:
metaAliasfrom provider ID
-
getFederationDonePageURL
public static String getFederationDonePageURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecated.Returns theFederationDonePageURLfrom the provider ID under root realm.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- the
FederationDonePageURLfrom the provider ID. - See Also:
getFederationDonePageURL(String,String,String,HttpServletRequest)
-
getFederationDonePageURL
public static String getFederationDonePageURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecated.Returns theFederationDonePageURLfrom the provider ID under a realm.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- the
FederationDonePageURLfrom the provider ID. - See Also:
getFederationDonePageURL(String,String,String,HttpServletRequest)
-
getTerminationDonePageURL
public static String getTerminationDonePageURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecatedReturns theTerminationDonePageURLfrom the provider ID under root realm.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- the
TerminationDonePageURLfrom the provider ID. - See Also:
getTerminationDonePageURL(String,String,String,HttpServletRequest)
-
getTerminationDonePageURL
public static String getTerminationDonePageURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Returns theTerminationDonePageURLfrom the provider ID under a realm.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- the
TerminationDonePageURLfrom the provider ID.
-
getTerminationURL
public static String getTerminationURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecatedReturns Termination URL.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- Termination URL.
- See Also:
getTerminationURL(String,String,String,HttpServletRequest)
-
getTerminationURL
public static String getTerminationURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Returns Termination URL.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- Termination URL.
-
getNameRegistrationURL
public static String getNameRegistrationURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecated.ReturnsNameRegistrationURL.- Parameters:
providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
NameRegistrationURL.- See Also:
getNameRegistrationURL(String,String,String,HttpServletRequest)
-
getNameRegistrationURL
public static String getNameRegistrationURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
ReturnsNameRegistrationURL.- Parameters:
realm- The realm under which the entity resides.providerID- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
NameRegistrationURL.
-
getErrorPageURL
public static String getErrorPageURL(String providerId, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecated. Please usegetErrorPageURL(String,String,String,HttpServletRequest)Returns the provider's error page.- Parameters:
providerId- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- the provider's error page.
- See Also:
getErrorPageURL(String,String,String,HttpServletRequest)
-
getErrorPageURL
public static String getErrorPageURL(String realm, String providerId, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Returns the provider's error page.- Parameters:
realm- The realm under which the entity resides.providerId- Provider's entity ID.providerRole- Provider Role.request- HTTP servlet request.- Returns:
- the provider's error page.
-
getFederationHandlerURL
public static String getFederationHandlerURL(jakarta.servlet.http.HttpServletRequest request)
Returns theFederationHandler.- Parameters:
request- HTTP servlet request- Returns:
- the
FederationHandler.
-
getConsentHandlerURL
public static String getConsentHandlerURL(jakarta.servlet.http.HttpServletRequest request)
Returns theConsentHandler.- Parameters:
request- HTTP servlet request.- Returns:
- the
ConsentHandler.
-
isLogoutSuccess
public static boolean isLogoutSuccess(jakarta.servlet.http.HttpServletRequest request)
Returns true if logout succeeded.- Parameters:
request- HTTP servlet request.- Returns:
- true if logout succeeded.
-
isTerminationSuccess
public static boolean isTerminationSuccess(jakarta.servlet.http.HttpServletRequest request)
Returns true if Termination succeeds.- Parameters:
request- HTTP servlet request.- Returns:
- true if Termination succeeds.
-
isFederationCancelled
public static boolean isFederationCancelled(jakarta.servlet.http.HttpServletRequest request)
Returns true if Federation is cancelled.- Parameters:
request- HTTP servlet request.- Returns:
- true if Federation is cancelled.
-
isTerminationCancelled
public static boolean isTerminationCancelled(jakarta.servlet.http.HttpServletRequest request)
Returns true if termination is cancelled.- Parameters:
request- HTTP servlet request.- Returns:
- true if termination is cancelled.
-
getRealmByMetaAlias
public static String getRealmByMetaAlias(String metaAlias)
Returns the realm by parsing the metaAlias. MetaAlias format is<realm>/<any string without '/'> for non-root realm or /<any string without '/'> for root realm.
- Parameters:
metaAlias- The metaAlias.- Returns:
- the realm associated with the metaAlias.
-
getNewRequest
public static String getNewRequest(jakarta.servlet.http.HttpServletRequest request)
Creates New Request ID from theHttpRequestServlet.- Parameters:
request- HTTP servlet request.- Returns:
- New Request ID from the
HttpRequestServlet.
-
setAuthnRequest
public static boolean setAuthnRequest(FSAuthnRequest request, String entityID)
Deprecated.This method is deprecated.Sets the authentication request to be sent to identity provider under root realm.- Parameters:
request-FSAuthnRequestassociated with a user session.entityID- Hosted Provider's entity ID- Returns:
trueif the operation is successful;falseotherwise.- See Also:
setAuthnRequest(FSAuthnRequest,String,String)
-
setAuthnRequest
public static boolean setAuthnRequest(FSAuthnRequest request, String realm, String entityID)
Sets the authentication request to be sent to identity provider.- Parameters:
request-FSAuthnRequestassociated with a user session.realm- the realm in which the entity residesentityID- Hosted Provider's entity ID- Returns:
trueif the operation is successful;falseotherwise.
-
cleanQueryString
public static String cleanQueryString(jakarta.servlet.http.HttpServletRequest request)
-
getSuccinctID
public static String getSuccinctID(String entityID)
Deprecated.This method has been deprecated. UsegetSuccinctID(String, String)Returns succinct ID of a provider.- Parameters:
entityID- provider's entity ID.- Returns:
- succinct ID of a provider.
-
getSuccinctID
public static String getSuccinctID(String providerID, String providerRole)
Returns succinct ID of a provider.- Parameters:
providerID- provider's entity ID.providerRole- provider Role.- Returns:
- succinct ID of a provider.
-
getRegisteredProviders
public static Set getRegisteredProviders(String userName, String hostProviderId, String providerRole)
Deprecated.This method is deprecated. Please usegetRegisteredProviders(String,String,String,String)Returns registered providers of an user.- Parameters:
userName- user ID.hostProviderId- Hosted provider's entity ID.providerRole- Hosted Provider Role.- Returns:
- registered providers.
- See Also:
getRegisteredProviders(String,String,String,String)
-
getRegisteredProviders
public static Set getRegisteredProviders(String userName, String realm, String hostProviderId, String providerRole)
Returns registered providers of an user.- Parameters:
userName- user ID.realm- The realm under which the entity resides.hostProviderId- Hosted provider's entity ID.providerRole- Hosted Provider Role.- Returns:
- registered providers.
-
getNameRegistrationProviderIDKey
public static String getNameRegistrationProviderIDKey()
Returns name registration provider ID key.- Returns:
- name registration provider ID key.
-
isNameRegistrationCancelled
public static boolean isNameRegistrationCancelled(jakarta.servlet.http.HttpServletRequest request)
Returns true if name registration is cancelled.- Parameters:
request- HTTP servlet request.- Returns:
- true if name registration is cancelled.
-
isNameRegistrationSuccess
public static boolean isNameRegistrationSuccess(jakarta.servlet.http.HttpServletRequest request)
Returns true if name registration succeeds.- Parameters:
request- HTTP servlet request.- Returns:
- true if name registration succeeds.
-
getNameRegistrationDonePageURL
public static String getNameRegistrationDonePageURL(String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Deprecated.This method is deprecated. Please usegetNameRegistrationDonePageURL( String,String,String,HttpServletRequest)Returns the NameRegistrationDonePageURLfrom theproviderIDunder root realm.- Parameters:
providerID- provider's entity ID.providerRole- provider Role.request- HTTP servlet request.- Returns:
- the Name
RegistrationDonePageURLfrom theproviderID. - See Also:
getNameRegistrationDonePageURL(String,String,String,HttpServletRequest)
-
getNameRegistrationDonePageURL
public static String getNameRegistrationDonePageURL(String realm, String providerID, String providerRole, jakarta.servlet.http.HttpServletRequest request)
Returns the NameRegistrationDonePageURLfrom theproviderIDunder a realm.- Parameters:
realm- The realm under which the entity resides.providerID- provider's entity ID.providerRole- provider Role.request- HTTP servlet request.- Returns:
- the Name
RegistrationDonePageURLfrom theproviderID.
-
getAuthnRequestEnvelope
public static String getAuthnRequestEnvelope(jakarta.servlet.http.HttpServletRequest request)
Returns Authentication Request Envelope from a HTTP servlet request.- Parameters:
request- a HTTP servlet request- Returns:
- Authentication Request Envelope in String
-
isLECPProfile
public static boolean isLECPProfile(jakarta.servlet.http.HttpServletRequest request)
Determines if a HTTP servlet request is Liberty-enabled client and proxy profile.- Parameters:
request- a HTTP servlet request- Returns:
trueif it is Liberty-enabled client and proxy profile
-
getLECPHeaderName
public static String getLECPHeaderName()
Returns Liberty-enabled client and proxy profile HTTP header name.- Returns:
- header name
-
getLECPContentType
public static String getLECPContentType()
Returns Liberty-enabled client and proxy profile HTTP content type.- Returns:
- content type
-
getDiscoveryBootStrapResourceOfferings
public static NodeList getDiscoveryBootStrapResourceOfferings(jakarta.servlet.http.HttpServletRequest request, String providerID)
Deprecated.This method has been deprecated. UsegetDiscoveryBootStrapResourceOfferings( HttpServletRequest request, String providerID, String providerRole)Returns the Discovery Service Resource Offerings nodes in an attribute statement. After a single sign-on with an Identity Provider, a service provider may get Discovery Service Resource Offerings through a SAML assertion. This APIs helps in retrieving the resource offerings if the user has been authenticated through the liberty SSO. It will need to have a valid single sign on token (generated through the liberty SSO).- Parameters:
request-HttpServletRequestassociated with a user session.providerID- Hosted Provider's entity ID- Returns:
NodeListDiscovery Resource Offering Nodes,nullif there is any failure or if there is not one
-
getDiscoveryBootStrapResourceOfferings
public static NodeList getDiscoveryBootStrapResourceOfferings(jakarta.servlet.http.HttpServletRequest request, String providerID, String providerRole)
Returns the Discovery Service Resource Offerings nodes in an attribute statement. After a single sign-on with an Identity Provider, a service provider may get Discovery Service Resource Offerings through a SAML assertion. This APIs helps in retrieving the resource offerings if the user has been authenticated through the liberty SSO. It will need to have a valid single sign on token (generated through the liberty SSO). The service provider should be under root realm.- Parameters:
request-HttpServletRequestassociated with a user session.providerID- Hosted Provider's entity IDproviderRole- Hosted Provider Role- Returns:
NodeListDiscovery Resource Offering Nodes,nullif there is any failure or if there is not one
-
getDiscoveryBootStrapCredentials
public static List getDiscoveryBootStrapCredentials(jakarta.servlet.http.HttpServletRequest request, String providerID)
Deprecated.This method has been deprecated. UsegetDiscoveryBootStrapCredentials( HttpServletRequest request, String providerID, String providerRole)Returns the Discovery Service Credentials in the Advice element. After a single sign-on with an Identity Provider, a service provider may get Discovery Service Resource Offerings and Credentials through a SAML assertion. This APIs helps in retrieving the Credentials if the user has been authenticated through the liberty SSO. It will need to have a valid single sign on token (generated through the liberty SSO). The service provider should be under root realm.- Parameters:
request-HttpServletRequestassociated with a user session.providerID- Hosted Provider's entity ID- Returns:
ListofSecurityAssertions, null if there is any failure or if there is not one
-
getDiscoveryBootStrapCredentials
public static List getDiscoveryBootStrapCredentials(jakarta.servlet.http.HttpServletRequest request, String providerID, String providerRole)
Returns the Discovery Service Credentials in the Advice element. After a single sign-on with an Identity Provider, a service provider may get Discovery Service Resource Offerings and Credentials through a SAML assertion. This APIs helps in retrieving the Credentials if the user has been authenticated through the liberty SSO. It will need to have a valid single sign on token (generated through the liberty SSO). The service provider should be under root realm.- Parameters:
request-HttpServletRequestassociated with a user session.providerID- Hosted Provider's entity IDproviderRole- Hosted Provider Role- Returns:
ListofSecurityAssertions,nullif there is any failure or if there is not one
-
getAuthnContext
public static String getAuthnContext(jakarta.servlet.http.HttpServletRequest request, String entityID)
Deprecated.This method is deprecated.Returns the authentication context used in liberty single sign-on. After single sign-on with an Identity Provider, a service provider may obtain the authentication context used by the identity provider that authenticates the user. It will need to have a valid single sign on token (generated through the liberty SSO). The providers are under root realm.- Parameters:
request-HttpServletRequestassociated with a user session.entityID- Hosted Provider's entity ID- Returns:
- authentication context string;
nullif there is any failure, or no liberty session is found. - See Also:
getAuthnContext(HttpServletRequest,String,String)
-
getAuthnContext
public static String getAuthnContext(jakarta.servlet.http.HttpServletRequest request, String realm, String entityID)
Returns the authentication context used in liberty single sign-on. After single sign-on with an Identity Provider, a service provider may obtain the authentication context used by the identity provider that authenticates the user. It will need to have a valid single sign on token (generated through the liberty SSO).- Parameters:
request-HttpServletRequestassociated with a user session.realm- the realm in which the provider residesentityID- Hosted Provider's entity ID- Returns:
- authentication context string;
nullif there is any failure, or no liberty session is found.
-
getAccountFedInfo
public static FSAccountFedInfo getAccountFedInfo(jakarta.servlet.http.HttpServletRequest request, String entityID)
Deprecated.This method is deprecated.Returns the federation information associated with current liberty session. It will need to have a valid single sign on token (generated through the liberty SSO). It is for a service provider in a root realm.- Parameters:
request-HttpServletRequestassociated with a user session.entityID- Hosted Provider's entity ID- Returns:
FSAccountFedInfoassociated with this session.nullif there is any failure, or no liberty session is found.- See Also:
getAccountFedInfo(HttpServletRequest,String,String,String)
-
getAccountFedInfo
public static FSAccountFedInfo getAccountFedInfo(jakarta.servlet.http.HttpServletRequest request, String realm, String entityID, String providerRole)
Returns the federation information associated with current liberty session. It will need to have a valid single sign on token (generated through the liberty SSO).- Parameters:
request-HttpServletRequestassociated with a user session.realm- the realm in which the provider residesentityID- Hosted Provider's entity IDproviderRole- the role of the provider- Returns:
FSAccountFedInfoassociated with this session.nullif there is any failure, or no liberty session is found.
-
getProviderRole
public static String getProviderRole(String metaAlias)
ReturnsproviderRolefrom theProviderAliasusingmeta Mgmtcalls.- Parameters:
metaAlias- ThemetaAliasof the provider- Returns:
providerRolecorresponding to themetaAlias.
-
getMappedNameIdentifier
public static NameIdentifier getMappedNameIdentifier(String hostedSPMetaAlias, Object ssoToken, String remoteSPEntityID)
ReturnsNameIdentifierbetween the IDP and the other SP for the same principal. This method should be used by the code on the hosted SP, where the user has logged in, and has an account linking with the IDP. Futhermore, the same principal has an account linking between his/her other (remote) SP account and the IDP account.- Parameters:
hostedSPMetaAlias- ThemetaAliasof the local service provider.ssoToken- The session token of the logged- in user on the local service provider.remoteSPEntityID- The entity ID of the remote service provider. In other words, it is the targeted name space for the returned name identifier.- Returns:
NameIdentifierof the same principal but original established between the remote SP and the IDP
-
-