# \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

File
  LogoutRequest.php
Package
  Default
Class hierarchy
  \OneLogin_Saml2_LogoutRequest

## Tags

None found

## Properties

### $id

    $id : string

Contains the ID of the Logout Request

#### Type

string

#

## Tags

None found

### $_settings

    $_settings : \OneLogin_Saml2_Settings

Object that represents the setting info

#### Type

\OneLogin_Saml2_Settings

#

## Tags

None found

### $_logoutRequest

    $_logoutRequest : string

SAML Logout Request

#### Type

string

#

## Tags

None found

### $_error

    $_error : string

After execute a validation process, this var contains the cause

#### Type

string

#

## Tags

None found

## 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

#

## Tags

None found

### 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

#

## Tags

None found

### 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

#

static

## Tags

None found

### 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)

#

static

## Tags

None found

### 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

#

static

## Tags

None found

### 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

#

static

## Tags

None found

### 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

#

static

## Tags

None found

### 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

#

## Tags

None found

### getError()

    getError() : string

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

#### Returns

string —

Cause

#

## Tags

None found

### getXML()

    getXML() : string

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

#### Returns

string

#

## Tags

None found

### LogoutRequest.php