Class FSFedTerminationHandler
- java.lang.Object
-
- com.sun.identity.federation.services.termination.FSFedTerminationHandler
-
public class FSFedTerminationHandler extends Object
Work engine that handles termination request/response.
-
-
Field Summary
Fields Modifier and Type Field Description protected FSAccountFedInfoacctInfoprotected static Stringerror_page_urlprotected static StringFEDERATE_COOKIE_NAMEprotected com.sun.identity.federation.jaxb.entityconfig.BaseConfigTypehostedConfigprotected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorTypehostedDescriptorprotected StringhostedEntityIdprotected StringhostedProviderRoleprotected Stringlocaleprotected FSAccountManagermanagerInstprotected StringmetaAliasprotected Stringrealmprotected static StringRELAY_STATEprotected StringrelayStateprotected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorTyperemoteDescriptorprotected StringremoteEntityIdprotected jakarta.servlet.http.HttpServletRequestrequestprotected jakarta.servlet.http.HttpServletResponseresponseprotected ObjectssoTokenprotected static Stringtermination_done_urlprotected StringuserID
-
Constructor Summary
Constructors Constructor Description FSFedTerminationHandler()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhandleFederationTermination(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object ssoToken)Initiates the federation termination operation.booleanprocessSOAPTerminationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSFederationTerminationNotification reqTermination)Processes the termination request received from a remote provider.voidprocessTerminationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSFederationTerminationNotification reqTermination)Processes the termination request received from a remote provider.voidresetFederateCookie()Resets ederate cookie when termination is done with one remote provider.voidsetAccountInfo(FSAccountFedInfo acctInfo)Sets the federation account information for the user with a specific remote provider.voidsetHostedDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType hostedDescriptor)Sets state to the Federation Termination handler that is handling the current federation termination.voidsetHostedDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)Sets hosted provider's extended meta.voidsetHostedEntityId(String hostedId)Sets hosted provider's entity ID.voidsetHostedProviderRole(String hostedProviderRole)Sets hosted provider's role.voidsetMetaAlias(String metaAlias)Sets hosted provider's meta alias.voidsetRealm(String realm)Sets realm.voidsetRemoteDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor)Sets state to the Federation Termination handler that is handling the current federation termination.voidsetRemoteEntityId(String remoteId)Sets remote provider's entity ID.protected voidsetTerminationURL()Invoked to set some commonly used URLs based on hosted provider.booleansetUserID(FSFederationTerminationNotification reqTermination)Finds the user based on the termination request received from a remote provider.voidsetUserID(String userID)Sets the UserID.protected jakarta.xml.soap.SOAPMessagesignTerminationRequest(jakarta.xml.soap.SOAPMessage msg, String idAttrName, String id)Signs Federation termination request before sending it to the remote provider.protected booleanupdateAccountInformation(NameIdentifier ni)Updates the user account information.
-
-
-
Field Detail
-
response
protected jakarta.servlet.http.HttpServletResponse response
-
request
protected jakarta.servlet.http.HttpServletRequest request
-
locale
protected String locale
-
ssoToken
protected Object ssoToken
-
userID
protected String userID
-
acctInfo
protected FSAccountFedInfo acctInfo
-
remoteDescriptor
protected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor
-
hostedDescriptor
protected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType hostedDescriptor
-
hostedConfig
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig
-
relayState
protected String relayState
-
managerInst
protected FSAccountManager managerInst
-
termination_done_url
protected static String termination_done_url
-
error_page_url
protected static String error_page_url
-
FEDERATE_COOKIE_NAME
protected static final String FEDERATE_COOKIE_NAME
-
RELAY_STATE
protected static final String RELAY_STATE
- See Also:
- Constant Field Values
-
realm
protected String realm
-
hostedEntityId
protected String hostedEntityId
-
remoteEntityId
protected String remoteEntityId
-
metaAlias
protected String metaAlias
-
hostedProviderRole
protected String hostedProviderRole
-
-
Method Detail
-
setTerminationURL
protected void setTerminationURL()
Invoked to set some commonly used URLs based on hosted provider.
-
setHostedDescriptor
public void setHostedDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType hostedDescriptor)
Sets state to the Federation Termination handler that is handling the current federation termination. The hosted provider identifies the provider who is handling the termnation request or initiating it locally.- Parameters:
hostedDescriptor- the Hosted provider Descriptor
-
setHostedDescriptorConfig
public void setHostedDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
Sets hosted provider's extended meta.- Parameters:
hostedConfig- hosted provider's extended config
-
setHostedEntityId
public void setHostedEntityId(String hostedId)
Sets hosted provider's entity ID.- Parameters:
hostedId- hosted provider's entity id
-
setHostedProviderRole
public void setHostedProviderRole(String hostedProviderRole)
Sets hosted provider's role.- Parameters:
hostedProviderRole- hosted provider's role
-
setMetaAlias
public void setMetaAlias(String metaAlias)
Sets hosted provider's meta alias.- Parameters:
metaAlias- hosted provider's meta alias
-
setRealm
public void setRealm(String realm)
Sets realm.- Parameters:
realm- The realm under which the entity resides.
-
setRemoteEntityId
public void setRemoteEntityId(String remoteId)
Sets remote provider's entity ID.- Parameters:
remoteId- remote provider's entity id
-
setRemoteDescriptor
public void setRemoteDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor)
Sets state to the Federation Termination handler that is handling the current federation termination. The remote provider identifies the provider who sent a request or with whom termination is to be initiated.- Parameters:
remoteDescriptor- the Remote provider Descriptor
-
setUserID
public void setUserID(String userID)
Sets the UserID.- Parameters:
userID- the user who is initiating the termination process
-
setAccountInfo
public void setAccountInfo(FSAccountFedInfo acctInfo)
Sets the federation account information for the user with a specific remote provider.- Parameters:
acctInfo- the account fed info object
-
setUserID
public boolean setUserID(FSFederationTerminationNotification reqTermination)
Finds the user based on the termination request received from a remote provider.- Parameters:
reqTermination- the termination request- Returns:
trueif the user is found;falseotherwise.
-
handleFederationTermination
public boolean handleFederationTermination(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object ssoToken)Initiates the federation termination operation.- Parameters:
request- HTTP requestresponse- HTTP responsessoToken- corresponding to the user's session- Returns:
trueif the termination initiation operation is successful;falseotherwise.
-
updateAccountInformation
protected boolean updateAccountInformation(NameIdentifier ni)
Updates the user account information. After sucessful operation, the federation status corresponding to the user with the remote provider is set to inactive.- Parameters:
ni-NameIdentifierobject corresponding to a user- Returns:
- boolean containing the status of the update operation
-
processTerminationRequest
public void processTerminationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSFederationTerminationNotification reqTermination)Processes the termination request received from a remote provider. Invoded when Http redirect profile is used.- Parameters:
request- HTTP requestresponse- HTTP responsereqTermination- the federation termination request received from remote provider
-
processSOAPTerminationRequest
public boolean processSOAPTerminationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSFederationTerminationNotification reqTermination)Processes the termination request received from a remote provider. Invoded when SOAP profile is used.- Parameters:
reqTermination- the federation termination request received from remote provider- Returns:
truewhen the process is successful;falseotherwise.
-
resetFederateCookie
public void resetFederateCookie()
Resets ederate cookie when termination is done with one remote provider. If no active federations exists then the cookie is set to "no"; otherwise it is set to "yes".
-
signTerminationRequest
protected jakarta.xml.soap.SOAPMessage signTerminationRequest(jakarta.xml.soap.SOAPMessage msg, String idAttrName, String id) throws SAMLExceptionSigns Federation termination request before sending it to the remote provider.- Parameters:
msg-SOAPMessagewhich includes termination request to be sent to remote provideridAttrName- name of the id attribute to be signedid- the value of the id attributer to be signed- Returns:
- signed termination request in
SOAPMessage - Throws:
SAMLException- if an error occurred during signing
-
-