\OneLogin_Saml2_LogoutRequest

SAML 2 Logout Request

Summary

Methods
Properties
Constants
__construct()
getRequest()
getID()
getNameIdData()
getNameId()
getIssuer()
getSessionIndexes()
isValid()
getError()
getXML()
$id
No constants found
No protected methods found
$_settings
$_logoutRequest
N/A
No private methods found
$_error
N/A

Properties

$id

$id : string

Contains the ID of the Logout Request

Type

string

$_settings

$_settings : \OneLogin_Saml2_Settings

Object that represents the setting info

Type

\OneLogin_Saml2_Settings

$_logoutRequest

$_logoutRequest : string

SAML Logout Request

Type

string

$_error

$_error : string

After execute a validation process, this var contains the cause

Type

string

Methods

__construct()

__construct(\OneLogin_Saml2_Settings  $settings, string|null  $request = null, string|null  $nameId = null, string|null  $sessionIndex = null, string|null  $nameIdFormat = null, string|null  $nameIdNameQualifier = null, string|null  $nameIdSPNameQualifier = null) 

Constructs the Logout Request object.

Parameters

\OneLogin_Saml2_Settings $settings

Settings

string|null $request

A UUEncoded Logout Request.

string|null $nameId

The NameID that will be set in the LogoutRequest.

string|null $sessionIndex

The SessionIndex (taken from the SAML Response in the SSO process).

string|null $nameIdFormat

The NameID Format will be set in the LogoutRequest.

string|null $nameIdNameQualifier

The NameID NameQualifier will be set in the LogoutRequest.

string|null $nameIdSPNameQualifier

The NameID SP NameQualifier will be set in the LogoutRequest.

Throws

\OneLogin_Saml2_Error

getRequest()

getRequest(boolean|null  $deflate = null) : string

Returns the Logout Request defated, base64encoded, unsigned

Parameters

boolean|null $deflate

Whether or not we should 'gzdeflate' the request body before we return it.

Returns

string —

Deflated base64 encoded Logout Request

getID()

getID(string|\DOMDocument  $request) : string

Returns the ID of the Logout Request.

Parameters

string|\DOMDocument $request

Logout Request Message

Throws

\OneLogin_Saml2_Error

Returns

string —

ID

getNameIdData()

getNameIdData(string|\DOMDocument  $request, string|null  $key = null) : array

Gets the NameID Data of the the Logout Request.

Parameters

string|\DOMDocument $request

Logout Request Message

string|null $key

The SP key

Throws

\OneLogin_Saml2_Error
\OneLogin_Saml2_ValidationError

Returns

array —

Name ID Data (Value, Format, NameQualifier, SPNameQualifier)

getNameId()

getNameId(string|\DOMDocument  $request, string|null  $key = null) : string

Gets the NameID of the Logout Request.

Parameters

string|\DOMDocument $request

Logout Request Message

string|null $key

The SP key

Throws

\OneLogin_Saml2_Error
\OneLogin_Saml2_ValidationError

Returns

string —

Name ID Value

getIssuer()

getIssuer(string|\DOMDocument  $request) : string|null

Gets the Issuer of the Logout Request.

Parameters

string|\DOMDocument $request

Logout Request Message

Throws

\Exception

Returns

string|null —

$issuer The Issuer

getSessionIndexes()

getSessionIndexes(string|\DOMDocument  $request) : array

Gets the SessionIndexes from the Logout Request.

Notice: Our Constructor only support 1 SessionIndex but this parser extracts an array of all the SessionIndex found on a Logout Request, that could be many.

Parameters

string|\DOMDocument $request

Logout Request Message

Throws

\Exception

Returns

array —

The SessionIndex value

isValid()

isValid(boolean  $retrieveParametersFromServer = false) : boolean

Checks if the Logout Request received is valid.

Parameters

boolean $retrieveParametersFromServer

Returns

boolean —

If the Logout Request is or not valid

getError()

getError() : string

After execute a validation process, if fails this method returns the cause

Returns

string —

Cause

getXML()

getXML() : string

Returns the XML that will be sent as part of the request or that was received at the SP

Returns

string