PHP Class OneLogin_Saml2_LogoutRequest

Datei anzeigen Open project: onelogin/php-saml Class Usage Examples

Public Properties

Property Type Description
$id string Contains the ID of the Logout Request

Protected Properties

Property Type Description
$_logoutRequest string SAML Logout Request
$_settings OneLogin_Saml2_Settings Object that represents the setting info

Public Methods

Method Description
__construct ( OneLogin_Saml2_Settings $settings, string | null $request = null, string | null $nameId = null, string | null $sessionIndex = null, string | null $nameIdFormat = null ) Constructs the Logout Request object.
getError ( ) * After execute a validation process, if fails this method returns the cause
getID ( string | DOMDocument $request ) : string Returns the ID of the Logout Request.
getIssuer ( string | DOMDocument $request ) : string | null Gets the Issuer of the Logout Request.
getNameId ( string | DOMDocument $request, string | null $key = null ) : string Gets the NameID of the Logout Request.
getNameIdData ( string | DOMDocument $request, string | null $key = null ) : array Gets the NameID Data of the the Logout Request.
getRequest ( boolean | null $deflate = null ) : string Returns the Logout Request defated, base64encoded, unsigned
getSessionIndexes ( string | DOMDocument $request ) : array Gets the SessionIndexes from the Logout Request.
isValid ( $retrieveParametersFromServer = false ) : boolean Checks if the Logout Request recieved is valid.

Method Details

__construct() public method

Constructs the Logout Request object.
public __construct ( OneLogin_Saml2_Settings $settings, string | null $request = null, string | null $nameId = null, string | null $sessionIndex = null, string | null $nameIdFormat = null )
$settings OneLogin_Saml2_Settings Settings
$request string | null A UUEncoded Logout Request.
$nameId string | null The NameID that will be set in the LogoutRequest.
$sessionIndex string | null The SessionIndex (taken from the SAML Response in the SSO process).
$nameIdFormat string | null The NameID Format will be set in the LogoutRequest.

getError() public method

* After execute a validation process, if fails this method returns the cause
public getError ( )

getID() public static method

Returns the ID of the Logout Request.
public static getID ( string | DOMDocument $request ) : string
$request string | DOMDocument Logout Request Message
return string ID

getIssuer() public static method

Gets the Issuer of the Logout Request.
public static getIssuer ( string | DOMDocument $request ) : string | null
$request string | DOMDocument Logout Request Message
return string | null $issuer The Issuer

getNameId() public static method

Gets the NameID of the Logout Request.
public static getNameId ( string | DOMDocument $request, string | null $key = null ) : string
$request string | DOMDocument Logout Request Message
$key string | null The SP key
return string Name ID Value

getNameIdData() public static method

Gets the NameID Data of the the Logout Request.
public static getNameIdData ( string | DOMDocument $request, string | null $key = null ) : array
$request string | DOMDocument Logout Request Message
$key string | null The SP key
return array Name ID Data (Value, Format, NameQualifier, SPNameQualifier)

getRequest() public method

Returns the Logout Request defated, base64encoded, unsigned
public getRequest ( boolean | null $deflate = null ) : string
$deflate boolean | null Whether or not we should 'gzdeflate' the request body before we return it.
return string Deflated base64 encoded Logout Request

getSessionIndexes() public static method

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.
public static getSessionIndexes ( string | DOMDocument $request ) : array
$request string | DOMDocument Logout Request Message
return array The SessionIndex value

isValid() public method

Checks if the Logout Request recieved is valid.
public isValid ( $retrieveParametersFromServer = false ) : boolean
return boolean If the Logout Request is or not valid

Property Details

$_logoutRequest protected_oe property

SAML Logout Request
protected string $_logoutRequest
return string

$_settings protected_oe property

Object that represents the setting info
protected OneLogin_Saml2_Settings $_settings
return OneLogin_Saml2_Settings

$id public_oe property

Contains the ID of the Logout Request
public string $id
return string