public class LogoutRequest extends Object
| Constructor and Description |
|---|
LogoutRequest(Saml2Settings settings)
Constructs a LogoutRequest object when a new request should be generated and
sent.
|
LogoutRequest(Saml2Settings settings,
HttpRequest request)
Constructs the LogoutRequest object when a received request should be
extracted from the HTTP request and parsed.
|
LogoutRequest(Saml2Settings settings,
HttpRequest request,
String nameId,
String sessionIndex)
Deprecated.
use
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String)
to build a new request to be sent |
LogoutRequest(Saml2Settings settings,
HttpRequest request,
String nameId,
String sessionIndex,
String nameIdFormat)
Deprecated.
use
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String)
to build a new request to be sent |
LogoutRequest(Saml2Settings settings,
HttpRequest request,
String nameId,
String sessionIndex,
String nameIdFormat,
String nameIdNameQualifier)
Deprecated.
use
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String)
to build a new request to be sent |
LogoutRequest(Saml2Settings settings,
HttpRequest request,
String nameId,
String sessionIndex,
String nameIdFormat,
String nameIdNameQualifier,
String nameIdSPNameQualifier)
Deprecated.
use
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String, String)
to build a new request to be sent |
LogoutRequest(Saml2Settings settings,
LogoutRequestParams params)
Constructs the LogoutRequest object when a new request should be generated
and sent.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getEncodedLogoutRequest() |
String |
getEncodedLogoutRequest(Boolean deflated) |
String |
getError()
After execute a validation process, if fails this method returns the cause
|
String |
getId() |
static String |
getId(Document samlLogoutRequestDocument)
Returns the ID of the Logout Request Document.
|
static String |
getId(String samlLogoutRequestString)
Returns the ID of the Logout Request String.
|
Calendar |
getIssueInstant()
Returns the issue instant of this message.
|
static Calendar |
getIssueInstant(Document samlLogoutRequestDocument)
Returns the issue instant of the Logout Request Document.
|
static Calendar |
getIssueInstant(String samlLogoutRequestString)
Returns the issue instant of the Logout Request Document.
|
static String |
getIssuer(Document samlLogoutRequestDocument)
Gets the Issuer from Logout Request Document.
|
static String |
getIssuer(Document samlLogoutRequestDocument,
boolean trim)
Gets the Issuer from Logout Request Document.
|
static String |
getIssuer(String samlLogoutRequestString)
Gets the Issuer from Logout Request String.
|
static String |
getIssuer(String samlLogoutRequestString,
boolean trim)
Gets the Issuer from Logout Request String.
|
String |
getLogoutRequestXml() |
static String |
getNameId(Document samlLogoutRequestDocument)
Gets the NameID value provided from the SAML Logout Request Document.
|
static String |
getNameId(Document samlLogoutRequestDocument,
PrivateKey key)
Gets the NameID value provided from the SAML Logout Request Document.
|
static String |
getNameId(Document samlLogoutRequestDocument,
PrivateKey key,
boolean trimValue)
Gets the NameID value provided from the SAML Logout Request Document.
|
static String |
getNameId(String samlLogoutRequestString)
Gets the NameID value provided from the SAML Logout Request String.
|
static String |
getNameId(String samlLogoutRequestString,
PrivateKey key)
Gets the NameID value provided from the SAML Logout Request String.
|
static String |
getNameId(String samlLogoutRequestString,
PrivateKey key,
boolean trimValue)
Gets the NameID value provided from the SAML Logout Request String.
|
static Map<String,String> |
getNameIdData(Document samlLogoutRequestDocument,
PrivateKey key)
Gets the NameID Data from the the Logout Request Document.
|
static Map<String,String> |
getNameIdData(Document samlLogoutRequestDocument,
PrivateKey key,
boolean trimValue)
Gets the NameID Data from the the Logout Request Document.
|
static Map<String,String> |
getNameIdData(String samlLogoutRequestString,
PrivateKey key)
Gets the NameID Data from the the Logout Request String.
|
static Map<String,String> |
getNameIdData(String samlLogoutRequestString,
PrivateKey key,
boolean trimValue)
Gets the NameID Data from the the Logout Request String.
|
static List<String> |
getSessionIndexes(Document samlLogoutRequestDocument)
Gets the SessionIndexes from the LogoutRequest.
|
static List<String> |
getSessionIndexes(Document samlLogoutRequestDocument,
boolean trim)
Gets the SessionIndexes from the LogoutRequest.
|
static List<String> |
getSessionIndexes(String samlLogoutRequestString)
Gets the SessionIndexes from the LogoutRequest.
|
static List<String> |
getSessionIndexes(String samlLogoutRequestString,
boolean trim)
Gets the SessionIndexes from the LogoutRequest.
|
Exception |
getValidationException()
After execute a validation process, if fails this method returns the Exception object
|
Boolean |
isValid()
Determines if the SAML LogoutRequest is valid or not
|
protected String |
postProcessXml(String logoutRequestXml,
LogoutRequestParams params,
Saml2Settings settings)
Allows for an extension class to post-process the LogoutRequest XML generated
for this request, in order to customize the result.
|
protected void |
setValidationException(Exception validationException)
Sets the validation exception that this
LogoutRequest should return
when a validation error occurs. |
public String id
@Deprecated public LogoutRequest(Saml2Settings settings, HttpRequest request, String nameId, String sessionIndex, String nameIdFormat, String nameIdNameQualifier, String nameIdSPNameQualifier)
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String, String)
to build a new request to be sentsettings - OneLogin_Saml2_Settingsrequest - the HttpRequest object to be processed (Contains GET and POST
parameters, request URL, ...).nameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).nameIdFormat - The nameIdFormat that will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier that will be set in the LogoutRequest.nameIdSPNameQualifier - The SP Name Qualifier that will be set in the LogoutRequest.@Deprecated public LogoutRequest(Saml2Settings settings, HttpRequest request, String nameId, String sessionIndex, String nameIdFormat, String nameIdNameQualifier)
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String, String)
to build a new request to be sentsettings - OneLogin_Saml2_Settingsrequest - the HttpRequest object to be processed (Contains GET and POST
parameters, request URL, ...).nameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).nameIdFormat - The nameIdFormat that will be set in the LogoutRequest.nameIdNameQualifier - The NameID NameQualifier will be set in the LogoutRequest.@Deprecated public LogoutRequest(Saml2Settings settings, HttpRequest request, String nameId, String sessionIndex, String nameIdFormat)
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String, String)
to build a new request to be sentsettings - OneLogin_Saml2_Settingsrequest - the HttpRequest object to be processed (Contains GET and POST
parameters, request URL, ...).nameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).nameIdFormat - The nameIdFormat that will be set in the LogoutRequest.@Deprecated public LogoutRequest(Saml2Settings settings, HttpRequest request, String nameId, String sessionIndex)
LogoutRequest(Saml2Settings, HttpRequest) to build a
received request from the HTTP request, or
LogoutRequest(Saml2Settings, LogoutRequestParams) with
LogoutRequestParams.LogoutRequestParams(String, String)
to build a new request to be sentsettings - OneLogin_Saml2_Settingsrequest - the HttpRequest object to be processed (Contains GET and POST
parameters, request URL, ...).nameId - The NameID that will be set in the LogoutRequest.sessionIndex - The SessionIndex (taken from the SAML Response in the SSO
process).public LogoutRequest(Saml2Settings settings)
settings - OneLogin_Saml2_SettingsLogoutRequest(Saml2Settings, LogoutRequestParams)public LogoutRequest(Saml2Settings settings, HttpRequest request)
settings - OneLogin_Saml2_Settingsrequest - the HttpRequest object to be processed (Contains GET and POST
parameters, request URL, ...).public LogoutRequest(Saml2Settings settings, LogoutRequestParams params)
settings - OneLogin_Saml2_Settingsparams - a set of authentication request input parameters that shape the
request to createprotected String postProcessXml(String logoutRequestXml, LogoutRequestParams params, Saml2Settings settings)
This method is invoked at construction time when no existing LogoutRequest message is found in the HTTP request (and hence in the logout request sending scenario only), after all the other fields of this class have already been initialised. Its default implementation simply returns the input XML as-is, with no change.
logoutRequestXml - the XML produced for this LogoutRequest by the standard
implementation provided by LogoutRequestparams - the logout request input parameterssettings - the settingsgetLogoutRequestXml()public String getEncodedLogoutRequest(Boolean deflated) throws IOException
deflated - If deflated or not the encoded Logout RequestIOExceptionpublic String getEncodedLogoutRequest() throws IOException
IOExceptionpublic String getLogoutRequestXml()
public Boolean isValid()
public static String getId(Document samlLogoutRequestDocument)
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.public static Calendar getIssueInstant(Document samlLogoutRequestDocument)
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.public static String getId(String samlLogoutRequestString)
samlLogoutRequestString - A Logout Request string.public static Calendar getIssueInstant(String samlLogoutRequestString)
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.public static Map<String,String> getNameIdData(Document samlLogoutRequestDocument, PrivateKey key) throws Exception
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.key - The SP key to decrypt the NameID if encryptedExceptionpublic static Map<String,String> getNameIdData(Document samlLogoutRequestDocument, PrivateKey key, boolean trimValue) throws Exception
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.key - The SP key to decrypt the NameID if encryptedtrimValue - whether the extracted Name ID value should be trimmedExceptionpublic static Map<String,String> getNameIdData(String samlLogoutRequestString, PrivateKey key) throws Exception
samlLogoutRequestString - A DOMDocument object loaded from the SAML Logout Request.key - The SP key to decrypt the NameID if encryptedExceptionpublic static Map<String,String> getNameIdData(String samlLogoutRequestString, PrivateKey key, boolean trimValue) throws Exception
samlLogoutRequestString - A DOMDocument object loaded from the SAML Logout Request.key - The SP key to decrypt the NameID if encryptedtrimValue - whether the extracted Name ID value should be trimmedExceptionpublic static String getNameId(Document samlLogoutRequestDocument, PrivateKey key) throws Exception
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.key - The SP key to decrypt the NameID if encryptedExceptionpublic static String getNameId(Document samlLogoutRequestDocument, PrivateKey key, boolean trimValue) throws Exception
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.key - The SP key to decrypt the NameID if encryptedtrimValue - whether the extracted Name ID value should be trimmedExceptionpublic static String getNameId(Document samlLogoutRequestDocument) throws Exception
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.Exceptionpublic static String getNameId(String samlLogoutRequestString, PrivateKey key) throws Exception
samlLogoutRequestString - A Logout Request string.key - The SP key to decrypt the NameID if encryptedExceptionpublic static String getNameId(String samlLogoutRequestString, PrivateKey key, boolean trimValue) throws Exception
samlLogoutRequestString - A Logout Request string.key - The SP key to decrypt the NameID if encryptedtrimValue - whether the extracted Name ID value should be trimmedExceptionpublic static String getNameId(String samlLogoutRequestString) throws Exception
samlLogoutRequestString - A Logout Request string.Exceptionpublic static String getIssuer(Document samlLogoutRequestDocument) throws XPathExpressionException
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.XPathExpressionExceptionpublic static String getIssuer(Document samlLogoutRequestDocument, boolean trim) throws XPathExpressionException
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.trim - whether the extracted issuer value should be trimmedXPathExpressionExceptionpublic static String getIssuer(String samlLogoutRequestString) throws XPathExpressionException
samlLogoutRequestString - A Logout Request string.XPathExpressionExceptionpublic static String getIssuer(String samlLogoutRequestString, boolean trim) throws XPathExpressionException
samlLogoutRequestString - A Logout Request string.trim - whether the extracted issuer value should be trimmedXPathExpressionExceptionpublic static List<String> getSessionIndexes(Document samlLogoutRequestDocument) throws XPathExpressionException
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.XPathExpressionExceptionpublic static List<String> getSessionIndexes(Document samlLogoutRequestDocument, boolean trim) throws XPathExpressionException
samlLogoutRequestDocument - A DOMDocument object loaded from the SAML Logout Request.trim - whether the extracted session indexes should be trimmedXPathExpressionExceptionpublic static List<String> getSessionIndexes(String samlLogoutRequestString) throws XPathExpressionException
samlLogoutRequestString - A Logout Request string.XPathExpressionExceptionpublic static List<String> getSessionIndexes(String samlLogoutRequestString, boolean trim) throws XPathExpressionException
samlLogoutRequestString - A Logout Request string.trim - whether the extracted session indexes should be trimmedXPathExpressionExceptionpublic String getError()
public Exception getValidationException()
protected void setValidationException(Exception validationException)
LogoutRequest should return
when a validation error occurs.validationException - the validation exception to setpublic String getId()
Copyright © 2021. All rights reserved.