public class IDPSingleLogout extends Object
LogoutRequest
from IDP to SP.Modifier and Type | Method and Description |
---|---|
static String |
getSingleLogoutLocation(String spEntityID,
String realm,
String binding)
Returns single logout location for the service provider.
|
static List<SingleLogoutServiceElement> |
getSPSLOServiceEndpoints(String realm,
String spEntityID)
Gets the single log out end points for the Service Provider.
|
static void |
initiateLogoutRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PrintWriter out,
String binding,
Map paramsMap)
Parses the request parameters and initiates the Logout
Request to be sent to the SP.
|
static void |
processLogoutRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PrintWriter out,
String samlRequest,
String relayState)
Gets and processes the Single
LogoutRequest from SP. |
static LogoutResponse |
processLogoutRequest(LogoutRequest logoutReq,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PrintWriter out,
String binding,
String relayState,
String idpEntityID,
String realm,
boolean isVerified)
Gets and processes the Single
LogoutRequest from SP
and return LogoutResponse . |
static boolean |
processLogoutResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PrintWriter out,
String samlResponse,
String relayState)
Gets and processes the Single
LogoutResponse from SP,
destroys the local session, checks response's issuer
and inResponseTo. |
public static void initiateLogoutRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PrintWriter out, String binding, Map paramsMap) throws SAML2Exception
request
- the HttpServletRequest.response
- the HttpServletResponse.out
- the print writer for writing out presentationbinding
- binding used for this request.paramsMap
- Map of all other parameters.
Following parameters names with their respective
String values are allowed in this paramsMap.
"RelayState" - the target URL on successful Single Logout
"Destination" - A URI Reference indicating the address to
which the request has been sent.
"Consent" - Specifies a URI a SAML defined identifier
known as Consent Identifiers.
"Extension" - Specifies a list of Extensions as list of
String objects.SAML2Exception
- if error initiating request to SP.public static void processLogoutRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PrintWriter out, String samlRequest, String relayState) throws SAML2Exception, SessionException
LogoutRequest
from SP.request
- the HttpServletRequest.response
- the HttpServletResponse.out
- the print writer for writing out presentationsamlRequest
- LogoutRequest
in the
XML string format.relayState
- the target URL on successful
LogoutRequest
.SAML2Exception
- if error processing
LogoutRequest
.SessionException
- if error processing
LogoutRequest
.public static String getSingleLogoutLocation(String spEntityID, String realm, String binding) throws SAML2Exception
SAML2Exception
public static boolean processLogoutResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PrintWriter out, String samlResponse, String relayState) throws SAML2Exception, SessionException
LogoutResponse
from SP,
destroys the local session, checks response's issuer
and inResponseTo.request
- the HttpServletRequest.response
- the HttpServletResponse.out
- the print writer for writing out presentationsamlResponse
- LogoutResponse
in the
XML string format.relayState
- the target URL on successful
LogoutResponse
.SAML2Exception
- if error processing
LogoutResponse
.SessionException
- if error processing
LogoutResponse
.public static LogoutResponse processLogoutRequest(LogoutRequest logoutReq, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, PrintWriter out, String binding, String relayState, String idpEntityID, String realm, boolean isVerified) throws SAML2Exception
LogoutRequest
from SP
and return LogoutResponse
.logoutReq
- LogoutRequest
from SPrequest
- the HttpServletRequest.response
- the HttpServletResponse.out
- the print writer for writing out presentationbinding
- name of binding will be used for request processing.relayState
- the relay state.idpEntityID
- name of host entity ID.realm
- name of host entity.isVerified
- true if the request is verified already.LogoutRequest
.SAML2Exception
- if error processing
LogoutRequest
.public static List<SingleLogoutServiceElement> getSPSLOServiceEndpoints(String realm, String spEntityID) throws SAML2Exception
realm
- the realm that the service provider is configured withinspEntityID
- the id for the service provider configuration entitySAML2Exception
- if there was a problem retrieving the SP SSO Descriptor ElementCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.