Package com.sun.identity.saml2.plugins
Class FedletAdapter
- java.lang.Object
-
- com.sun.identity.saml2.plugins.FedletAdapter
-
@SupportedAll public abstract class FedletAdapter extends Object
TheFedletAdapter
abstract class provides methods that could be extended to perform user specific logics during SAMLv2 protocol processing on the Service Provider side. The implementation class could be configured on a per service provider basis in the extended metadata configuration.A singleton instance of this
FedletAdapter
class will be used per Service Provider during runtime, so make sure implementation of the methods are thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description static String
HOSTED_ENTITY_ID
Constants for hosted entity id parameter
-
Constructor Summary
Constructors Constructor Description FedletAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
doFedletSLO(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, LogoutRequest logoutReq, String hostedEntityID, String idpEntityID, List siList, String nameIDValue, String binding)
Invokes after Fedlet receives SLO request from IDP.abstract void
initialize(Map initParams)
Initializes the fedlet adapter, this method will only be executed once after creation of the adapter instance.void
onFedletSLOFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, LogoutRequest logoutReq, LogoutResponse logoutRes, String hostedEntityID, String idpEntityID, String binding)
Invokes after Fedlet receives SLO response from IDP and the SLO status is not success.void
onFedletSLOSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, LogoutRequest logoutReq, LogoutResponse logoutRes, String hostedEntityID, String idpEntityID, String binding)
Invokes after Fedlet receives SLO response from IDP and the SLO status is success.
-
-
-
Field Detail
-
HOSTED_ENTITY_ID
public static final String HOSTED_ENTITY_ID
Constants for hosted entity id parameter- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public abstract void initialize(Map initParams)
Initializes the fedlet adapter, this method will only be executed once after creation of the adapter instance.- Parameters:
initParams
- initial set of parameters configured in the fedlet for this adapter. One of the parameters namedHOSTED_ENTITY_ID
refers to the ID of this fedlet entity.
-
doFedletSLO
public boolean doFedletSLO(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, LogoutRequest logoutReq, String hostedEntityID, String idpEntityID, List siList, String nameIDValue, String binding) throws SAML2Exception
Invokes after Fedlet receives SLO request from IDP. It does the work of logout the user.- Parameters:
request
- servlet requestresponse
- servlet responsehostedEntityID
- entity ID for the fedletidpEntityID
- entity id for the IDP to which the request is received from.siList
- List of SessionIndex whose session to be logged outnameIDValue
- nameID value whose session to be logged outbinding
- Single Logout binding used, one of following values:SAML2Constants.SOAP
,SAML2Constants.HTTP_POST
,SAML2Constants.HTTP_REDIRECT
- Returns:
true
if user is logged out successfully;false
otherwise.- Throws:
SAML2Exception
- if user want to fail the process.
-
onFedletSLOSuccess
public void onFedletSLOSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, LogoutRequest logoutReq, LogoutResponse logoutRes, String hostedEntityID, String idpEntityID, String binding) throws SAML2Exception
Invokes after Fedlet receives SLO response from IDP and the SLO status is success.- Parameters:
request
- servlet requestresponse
- servlet responselogoutReq
- SAML2LogoutRequest
objectlogoutRes
- SAML2LogoutResponse
objecthostedEntityID
- entity ID for the fedletidpEntityID
- entity id for the IDP to which the logout response is received from.binding
- Single Logout binding used, one of following values:SAML2Constants.SOAP
,SAML2Constants.HTTP_POST
,SAML2Constants.HTTP_REDIRECT
- Throws:
SAML2Exception
- if user want to fail the process.
-
onFedletSLOFailure
public void onFedletSLOFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, LogoutRequest logoutReq, LogoutResponse logoutRes, String hostedEntityID, String idpEntityID, String binding) throws SAML2Exception
Invokes after Fedlet receives SLO response from IDP and the SLO status is not success.- Parameters:
request
- servlet requestresponse
- servlet responselogoutReq
- SAML2LogoutRequest
objectlogoutRes
- SAML2LogoutResponse
objecthostedEntityID
- entity ID for the fedletidpEntityID
- entity id for the IDP to which the logout response is received from.binding
- Single Logout binding used, one of following values:SAML2Constants.SOAP
,SAML2Constants.HTTP_POST
,SAML2Constants.HTTP_REDIRECT
- Throws:
SAML2Exception
- if user want to fail the process.
-
-