# OneLogin_Saml2_LogoutRequest

SAML 2 Logout Request

### Methods

## Constructs the Logout Request object.

    __construct(\OneLogin_Saml2_Settings $settings, string $request = null, string $nameId = null, string $sessionIndex = null)

### Arguments

#### $settings

`\OneLogin_Saml2_Settings`

Settings

#### $request

`string`

A UUEncoded Logout Request

#### $nameId

`string`

The NameID that will be set in the LogoutRequest.

#### $sessionIndex

`string`

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

## Returns the Logout Request defated, base64encoded, unsigned

    getRequest() : string

### Response

`string`

Deflated base64 encoded Logout Request

## Returns the ID of the Logout Request.

    getID(string|\DOMDocument $request) : string

static

### Arguments

#### $request

`string|\DOMDocument`

Logout Request Message

### Response

`string`

ID

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

    getError() : string

### Response

`string`

Error

## Gets the NameID Data of the the Logout Request.

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

static

### Arguments

#### $request

`string|\DOMDocument`

Logout Request Message

#### $key

`string`

The SP key

### Response

`array`

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

## Gets the NameID of the Logout Request.

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

static

### Arguments

#### $request

`string|\DOMDocument`

Logout Request Message

#### $key

`string`

The SP key

### Response

`string`

Name ID Value

## Gets the Issuer of the Logout Request.

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

static

### Arguments

#### $request

`string|\DOMDocument`

Logout Request Message

### Response

`string|null`

$issuer The Issuer

## Gets the SessionIndexes from the Logout Request.

    getSessionIndexes(string|\DOMDocument $request) : array

### Arguments

#### $request

`string|\DOMDocument`

Logout Request Message

### Response

`array`

The SessionIndex value

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

    getError() : string

### Response

`string`

Cause

## Checks if the Logout Request received is valid.

    isValid(\OneLogin_Saml2_Settings $settings, string|\DOMDocument $request, $debug = false) : boolean

static

### Arguments

#### $settings

`\OneLogin_Saml2_Settings`

Settings

#### $request

`string|\DOMDocument`

Logout Request decoded

#### $debug

``

### Response

`boolean`

If the Logout Request is or not valid

### Properties

## Object that represents the setting info

    _settings : \OneLogin_Saml2_Settings

var |

### Type(s)

`\OneLogin_Saml2_Settings`

## SAML Logout Request

    _logoutRequest : string

var |

### Type(s)

`string`

## After execute a validation process, if it fails, this var contains the cause

    error : string

var |

### Type(s)

`string`