public abstract class SAML2ServiceProviderAdapter extends Object
SAML2ServiceProviderAdapter
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 SAML2ServiceProviderAdapter
class will be used per Service Provider during runtime, so make sure
implementation of the methods are thread safe.
Constructor and Description |
---|
SAML2ServiceProviderAdapter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
initialize(Map initParams)
Initializes the federation adapter, this method will only be executed
once after creation of the adapter instance.
|
void |
postNewNameIDSuccess(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String userID,
ManageNameIDRequest idRequest,
ManageNameIDResponse idResponse,
String binding)
Invokes after new Name Identifier processing succeeded.
|
void |
postSingleLogoutSuccess(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String userID,
LogoutRequest logoutRequest,
LogoutResponse logoutResponse,
String binding)
Invokes after single logout process succeeded, i.e.
|
boolean |
postSingleSignOnFailure(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthnRequest authnRequest,
Response ssoResponse,
String profile,
int failureCode)
Invokes after Single Sign-On processing failed.
|
boolean |
postSingleSignOnSuccess(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PrintWriter out,
Object session,
AuthnRequest authnRequest,
Response ssoResponse,
String profile,
boolean isFederation)
Invokes after Single-Sign-On processing succeeded.
|
void |
postTerminateNameIDSuccess(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String userID,
ManageNameIDRequest idRequest,
ManageNameIDResponse idResponse,
String binding)
Invokes after Terminate Name Identifier processing succeeded.
|
void |
preSingleLogoutProcess(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String userID,
LogoutRequest logoutRequest,
LogoutResponse logoutResponse,
String binding)
Invokes before single logout process started on
SP side. |
void |
preSingleSignOnProcess(String hostedEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthnRequest authnRequest,
Response ssoResponse,
String profile)
Invokes when the
FAM received the Single-Sign-On response
from the IDP, this is called before any processing started on SP side. |
void |
preSingleSignOnRequest(String hostedEntityID,
String idpEntityID,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthnRequest authnRequest)
Invokes before OpenAM sends the
Single-Sign-On request to IDP.
|
public abstract void initialize(Map initParams)
initParams
- initial set of parameters configured in the service
provider for this adapter. One of the parameters named
HOSTED_ENTITY_ID
refers to the ID of this
hosted service provider entity, one of the parameters named
REALM
refers to the realm of the hosted entity.public void preSingleSignOnRequest(String hostedEntityID, String idpEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthnRequest authnRequest) throws SAML2Exception
hostedEntityID
- entity ID for the hosted SPidpEntityID
- entity id for the IDP to which the request will
be sent. This will be null in ECP case.realm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseauthnRequest
- the authentication request to be send to IDPSAML2Exception
- if user want to fail the process.public void preSingleSignOnProcess(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthnRequest authnRequest, Response ssoResponse, String profile) throws SAML2Exception
FAM
received the Single-Sign-On response
from the IDP, this is called before any processing started on SP side.hostedEntityID
- entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseauthnRequest
- the original authentication request sent from SP,
null if this is IDP initiated SSO.ssoResponse
- response from IDPprofile
- protocol profile used, one of the following values:
SAML2Constants.HTTP_POST
,
SAML2Constants.HTTP_ARTIFACT
,
SAML2Constants.PAOS
SAML2Exception
- if user want to fail the process.public boolean postSingleSignOnSuccess(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PrintWriter out, Object session, AuthnRequest authnRequest, Response ssoResponse, String profile, boolean isFederation) throws SAML2Exception
hostedEntityID
- Entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseout
- the print writer for writing out presentationsession
- user's sessionauthnRequest
- the original authentication request sent from SP,
null if this is IDP initiated SSO.ssoResponse
- response from IDPprofile
- protocol profile used, one of the following values:
SAML2Constants.HTTP_POST
,
SAML2Constants.HTTP_ARTIFACT
,
SAML2Constants.PAOS
isFederation
- true if this is federation case, false otherwise.SAML2Exception
- if user want to fail the process.public boolean postSingleSignOnFailure(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthnRequest authnRequest, Response ssoResponse, String profile, int failureCode)
hostedEntityID
- Entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseauthnRequest
- the original authentication request sent from SP,
null if this is IDP initiated SSO.ssoResponse
- response from IDPprofile
- protocol profile used, one of the following values:
SAML2Constants.HTTP_POST
,
SAML2Constants.HTTP_ARTIFACT
,
SAML2Constants.PAOS
failureCode
- an integer specifies the failure code. Possible
failure codes are defined in this interface.public void postNewNameIDSuccess(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String userID, ManageNameIDRequest idRequest, ManageNameIDResponse idResponse, String binding)
hostedEntityID
- Entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseuserID
- Universal ID of the user with whom the new name identifier
request performedidRequest
- New name identifier request, value will be
null if the request object is not availableidResponse
- New name identifier response, value will be
null if the response object is not availablebinding
- Binding used for new name identifier request,
one of following values:
SAML2Constants.SOAP
,
SAML2Constants.HTTP_REDIRECT
public void postTerminateNameIDSuccess(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String userID, ManageNameIDRequest idRequest, ManageNameIDResponse idResponse, String binding)
hostedEntityID
- Entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseuserID
- Universal ID of the user with whom name id termination
performed.idRequest
- Terminate name identifier request.idResponse
- Terminate name identifier response, value will be
null if the response object is not availablebinding
- binding used for Terminate Name Identifier request,
one of following values:
SAML2Constants.SOAP
,
SAML2Constants.HTTP_REDIRECT
public void preSingleLogoutProcess(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String userID, LogoutRequest logoutRequest, LogoutResponse logoutResponse, String binding) throws SAML2Exception
SP
side.
This method is called before the user session is invalidated on the
service provider side.hostedEntityID
- Entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseuserID
- universal ID of the userlogoutRequest
- single logout request objectlogoutResponse
- single logout response, value will be
null if the response object is not availablebinding
- binding used for Single Logout request,
one of following values:
SAML2Constants.SOAP
,
SAML2Constants.HTTP_REDIRECT
SAML2Exception
- if user want to fail the process.public void postSingleLogoutSuccess(String hostedEntityID, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String userID, LogoutRequest logoutRequest, LogoutResponse logoutResponse, String binding)
hostedEntityID
- Entity ID for the hosted SPrealm
- Realm of the hosted SP.request
- servlet requestresponse
- servlet responseuserID
- universal ID of the userlogoutRequest
- 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 availablebinding
- binding used for Single Logout request,
one of following values:
SAML2Constants.SOAP
,
SAML2Constants.HTTP_REDIRECT
Copyright © 2010-2018, ForgeRock All Rights Reserved.