Class FSDefaultSPAdapter
- java.lang.Object
-
- com.sun.identity.federation.plugins.FSDefaultSPAdapter
-
- All Implemented Interfaces:
FederationSPAdapter
public class FSDefaultSPAdapter extends Object implements FederationSPAdapter
-
-
Field Summary
-
Fields inherited from interface com.sun.identity.federation.plugins.FederationSPAdapter
ENV_REALM, FEDERATION_FAILED, FEDERATION_FAILED_ANON_AUTH_ACCOUNT_EXPIRED, FEDERATION_FAILED_ANON_AUTH_USER_INACTIVE, FEDERATION_FAILED_ANON_AUTH_USER_LOCKED, FEDERATION_FAILED_ANON_TOKEN_GENERATION, FEDERATION_FAILED_SSO_TOKEN_GENERATION, FEDERATION_FAILED_WRITING_ACCOUNT_INFO, INVALID_AUTHN_RESPONSE, INVALID_RESPONSE, SSO_FAILED, SSO_FAILED_AUTH_ACCOUNT_EXPIRED, SSO_FAILED_AUTH_USER_INACTIVE, SSO_FAILED_AUTH_USER_LOCKED, SSO_FAILED_AUTO_FED, SSO_FAILED_FEDERATION_DOESNOT_EXIST, SSO_FAILED_TOKEN_GENERATION, SUCCESS
-
-
Constructor Summary
Constructors Constructor Description FSDefaultSPAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(String hostedProviderID, Set initParams)Initializes the federation adapter, this method will only be executed once after creation of the adapter instance.voidpostRegisterNameIdentifierSuccess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSNameRegistrationRequest regRequest, FSNameRegistrationResponse regResponse, String regProfile)Invokes after Register Name Identifier processing is successfulvoidpostSingleLogoutSuccess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSLogoutNotification logoutRequest, FSLogoutResponse logoutResponse, String sloProfile)Invokes after single logout is successful completed, i.e. user token has been invalidated.booleanpostSSOFederationFailure(String hostedEntityID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest, FSAuthnResponse authnResponse, FSResponse samlResponse, int failureCode)Invokes this method if the Single-Sign-On or Federation fails for some reason.booleanpostSSOFederationSuccess(String hostedEntityID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object ssoToken, FSAuthnRequest authnRequest, FSAuthnResponse authnResponse, FSResponse samlResponse)Invokes this method after the successful Single Sign-On or Federation.voidpostTerminationNotificationSuccess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSFederationTerminationNotification notification, String termProfile)Invokes after the service provider successfully terminates federation with IDP.voidpreSingleLogoutProcess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSLogoutNotification logoutRequest, FSLogoutResponse logoutResponse, String sloProfile)Invokes before single logout process started on FM side.voidpreSSOFederationProcess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest, FSAuthnResponse authnResponse, FSResponse samlResponse)Invokes when the FM received the Single-Sign-On and Federation response from the IDP, this is called before any processing started on SP side.voidpreSSOFederationRequest(String hostedProviderID, String idpProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest)Invokes before federation manager sends the Single-Sing-On and Federation * request to IDP.
-
-
-
Method Detail
-
initialize
public void initialize(String hostedProviderID, Set initParams)
Initializes the federation adapter, this method will only be executed once after creation of the adapter instance.- Specified by:
initializein interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPinitParams- initial set of parameters configured in the service provider for this adapter
-
preSSOFederationRequest
public void preSSOFederationRequest(String hostedProviderID, String idpProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest)
Invokes before federation manager sends the Single-Sing-On and Federation * request to IDP.- Specified by:
preSSOFederationRequestin interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPidpProviderID- provider id for the IDP to which the request will be sentrequest- servlet requestresponse- servlet responseauthnRequest- the authentication request to be send to IDP
-
preSSOFederationProcess
public void preSSOFederationProcess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest, FSAuthnResponse authnResponse, FSResponse samlResponse) throws FederationException
Invokes when the FM received the Single-Sign-On and Federation response from the IDP, this is called before any processing started on SP side.- Specified by:
preSSOFederationProcessin interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPrequest- servlet requestresponse- servlet responseauthnRequest- the original authentication request sent from SPauthnResponse- response from IDP if Browser POST or LECP profile is used for the request, value will be null if Browser Artifact profile is used.samlResponse- response from IDP if Browser Artifact profile is used for the request, value will be null if Browser POST or LECP profile is used.- Throws:
FederationException- if user want to fail the process.
-
postSSOFederationSuccess
public boolean postSSOFederationSuccess(String hostedEntityID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object ssoToken, FSAuthnRequest authnRequest, FSAuthnResponse authnResponse, FSResponse samlResponse) throws FederationException
Invokes this method after the successful Single Sign-On or Federation.- Specified by:
postSSOFederationSuccessin interfaceFederationSPAdapter- Parameters:
hostedEntityID- provider ID for the hosted SPrequest- servlet requestresponse- servlet responsessoToken- user's SSO tokenauthnRequest- the original authentication request sent from SPauthnResponse- response from IDP if Browser POST or LECP profile is used for the request, value will be null if Browser Artifact profile is used.samlResponse- response from IDP if Browser Artifact profile is used for the request, value will be null if Browser POST or LECP profile is used.- Returns:
- true if browser redirection happened, false otherwise.
- Throws:
FederationException- if user want to fail the process.
-
postSSOFederationFailure
public boolean postSSOFederationFailure(String hostedEntityID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest, FSAuthnResponse authnResponse, FSResponse samlResponse, int failureCode)
Invokes this method if the Single-Sign-On or Federation fails for some reason.- Specified by:
postSSOFederationFailurein interfaceFederationSPAdapter- Parameters:
request- servlet requestresponse- servlet responseauthnRequest- the original authentication request sent from SPauthnResponse- response from IDP if Browser POST or LECP profile is used for the request, value will be null if Browser Artifact profile is used.samlResponse- response from IDP if Browser Artifact profile is used for the request, value will be null if Browser POST or LECP profile is used.failureCode- an integer specifies the failure code.hostedEntityID- Entity ID for the hosted SP- Returns:
- true if browser redirection happened, false otherwise.
-
postRegisterNameIdentifierSuccess
public void postRegisterNameIdentifierSuccess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSNameRegistrationRequest regRequest, FSNameRegistrationResponse regResponse, String regProfile)
Invokes after Register Name Identifier processing is successful- Specified by:
postRegisterNameIdentifierSuccessin interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPrequest- servlet requestresponse- servlet responseuserDN- DN of the user with whom name identifier registration performedregRequest- register name identifier request, value will be null if the request object is not availableregResponse- register name identifier response, value will be null if the response object is not availableregProfile- register name identifier profile used, one of followingIFSConstants.NAME_REGISTRATION_SP_HTTP_PROFILEIFSConstants.NAME_REGISTRATION_SP_SOAP_PROFILEIFSConstants.NAME_REGISTRATION_IDP_HTTP_PROFILEIFSConstants.NAME_REGISTRATION_IDP_SOAP_PROFILE
-
postTerminationNotificationSuccess
public void postTerminationNotificationSuccess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSFederationTerminationNotification notification, String termProfile)
Invokes after the service provider successfully terminates federation with IDP.- Specified by:
postTerminationNotificationSuccessin interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPrequest- servlet requestresponse- servlet responseuserDN- DN of the user with whom name identifier registration performednotification- federation termination notification messagetermProfile- federation termination profile used, one of followingIFSConstants.TERMINATION_SP_HTTP_PROFILEIFSConstants.TERMINATION_SP_SOAP_PROFILEIFSConstants.TERMINATION_IDP_HTTP_PROFILEIFSConstants.TERMINATION_IDP_SOAP_PROFILE
-
preSingleLogoutProcess
public void preSingleLogoutProcess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSLogoutNotification logoutRequest, FSLogoutResponse logoutResponse, String sloProfile)
Invokes before single logout process started on FM side. This method is called before the user token is invalidated on the service provider side.- Specified by:
preSingleLogoutProcessin interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPrequest- servlet requestresponse- servlet responseuserDN- user DNlogoutRequest- single logout request objectlogoutResponse- single logout response, value will be null if the response object is not availablesloProfile- single logout profile used, one of followingIFSConstants.LOGOUT_SP_REDIRECT_PROFILEIFSConstants.LOGOUT_SP_SOAP_PROFILEIFSConstants.LOGOUT_IDP_REDIRECT_PROFILEIFSConstants.LOGOUT_IDP_SOAP_PROFILE
-
postSingleLogoutSuccess
public void postSingleLogoutSuccess(String hostedProviderID, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String userDN, FSLogoutNotification logoutRequest, FSLogoutResponse logoutResponse, String sloProfile)
Invokes after single logout is successful completed, i.e. user token has been invalidated.- Specified by:
postSingleLogoutSuccessin interfaceFederationSPAdapter- Parameters:
hostedProviderID- provider ID for the hosted SPrequest- servlet requestresponse- servlet responseuserDN- user DNlogoutRequest- single logout request, value will be null if the request object is not availablelogoutResponse- single logout response, value will be null if the response object is not availablesloProfile- single logout profile used, one of followingIFSConstants.LOGOUT_SP_HTTP_PROFILEIFSConstants.LOGOUT_SP_SOAP_PROFILEIFSConstants.LOGOUT_IDP_HTTP_PROFILEIFSConstants.LOGOUT_IDP_SOAP_PROFILE
-
-