public class LogoutResponse extends Object
| Constructor and Description |
|---|
LogoutResponse(Saml2Settings settings,
HttpRequest request)
Constructs the LogoutResponse object when a received response should be
extracted from the HTTP request and parsed.
|
LogoutResponse(Saml2Settings settings,
LogoutResponseParams params)
Constructs the LogoutResponse object when a new response should be generated
and sent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
build()
Deprecated.
use
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead) |
void |
build(String inResponseTo)
Deprecated.
use
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead) |
void |
build(String inResponseTo,
SamlResponseStatus responseStatus)
Deprecated.
use
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead) |
void |
build(String inResponseTo,
String statusCode)
Deprecated.
use
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead) |
String |
getEncodedLogoutResponse() |
String |
getEncodedLogoutResponse(Boolean deflated) |
String |
getError()
After execute a validation process, if fails this method returns the cause
|
String |
getId() |
Calendar |
getIssueInstant()
Returns the issue instant of this message.
|
String |
getIssuer()
Gets the Issuer from Logout Response.
|
String |
getLogoutResponseXml() |
SamlResponseStatus |
getSamlResponseStatus()
Gets the Status of the Logout Response.
|
String |
getStatus()
Gets the Status of the Logout Response.
|
Exception |
getValidationException()
After execute a validation process, if fails this method returns the Exception object
|
Boolean |
isValid() |
Boolean |
isValid(String requestId)
Determines if the SAML LogoutResponse is valid
|
protected String |
postProcessXml(String logoutResponseXml,
LogoutResponseParams params,
Saml2Settings settings)
Allows for an extension class to post-process the LogoutResponse XML
generated for this response, in order to customize the result.
|
protected NodeList |
query(String query)
Extracts nodes that match the query from the DOMDocument (Logout Response Menssage)
|
protected void |
setValidationException(Exception validationException)
Sets the validation exception that this
LogoutResponse should return
when a validation error occurs. |
public LogoutResponse(Saml2Settings settings, HttpRequest request)
settings - OneLogin_Saml2_Settingsrequest - the HttpRequest object to be processed (Contains GET and POST
parameters, request URL, ...); may be null when
building an outgoing logout responsepublic LogoutResponse(Saml2Settings settings, LogoutResponseParams params)
settings - OneLogin_Saml2_Settingsparams - a set of logout response input parameters that shape the
request to createpublic String getEncodedLogoutResponse(Boolean deflated) throws IOException
deflated - If deflated or not the encoded Logout ResponseIOExceptionpublic String getEncodedLogoutResponse() throws IOException
IOExceptionpublic String getLogoutResponseXml()
public String getId()
public Boolean isValid(String requestId)
requestId - The ID of the LogoutRequest sent by this SP to the IdPpublic Boolean isValid()
public String getIssuer() throws XPathExpressionException
XPathExpressionExceptionpublic String getStatus() throws XPathExpressionException
XPathExpressionExceptionpublic SamlResponseStatus getSamlResponseStatus() throws ValidationError
ValidationErrorprotected NodeList query(String query) throws XPathExpressionException
query - Xpath ExpressionXPathExpressionException@Deprecated public void build(String inResponseTo, SamlResponseStatus responseStatus)
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead)inResponseTo - InResponseTo attribute value to bet set at the Logout Response.responseStatus - SamlResponseStatus response status to be set on the
LogoutResponse@Deprecated public void build(String inResponseTo, String statusCode)
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead)inResponseTo - InResponseTo attribute value to bet set at the Logout Response.statusCode - String StatusCode to be set on the LogoutResponse@Deprecated public void build(String inResponseTo)
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead)inResponseTo - InResponseTo attribute value to bet set at the Logout Response.@Deprecated public void build()
LogoutResponse(Saml2Settings, LogoutResponseParams)
instead, in which case this method becomes completely useless;
indeed, invoking this method in an outgoing logout response
scenario will cause the response parameters specified at
construction time (inResponseTo and
responseStatus) to be overwritten, as well as its
generated id and issue instant; on the other hand invoking this
method in a received logout response scenario does not make sense
at all (and in that case
LogoutResponse(Saml2Settings, HttpRequest) should be
used instead)protected String postProcessXml(String logoutResponseXml, LogoutResponseParams params, Saml2Settings settings)
This method is invoked by build(String, String) (and all of its
overloadings) and hence only in the logout response sending scenario. Its
default implementation simply returns the input XML as-is, with no change.
logoutResponseXml - the XML produced for this LogoutResponse by the standard
implementation provided by LogoutResponseparams - the logout request input parameterssettings - the settingsgetLogoutResponseXml()public String getError()
public Exception getValidationException()
protected void setValidationException(Exception validationException)
LogoutResponse should return
when a validation error occurs.validationException - the validation exception to setpublic Calendar getIssueInstant() throws ValidationError
Calendar instance carrying the issue instant of this messageValidationError - if this logout response was received and parsed and the found IssueInstant
attribute is not in the expected UTC form of ISO-8601 formatCopyright © 2022. All rights reserved.