PHP 클래스 OneLogin_Saml2_Response

파일 보기 프로젝트 열기: onelogin/php-saml 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$decryptedDocument DomDocument A DOMDocument class loaded from the SAML Response (Decrypted).
$document DomDocument A DOMDocument class loaded from the SAML Response.
$encrypted boolean The response contains an encrypted assertion.
$response string The decoded, unprocessed XML response provided to the constructor.

보호된 프로퍼티들

프로퍼티 타입 설명
$_settings OneLogin_Saml2_Settings Settings

공개 메소드들

메소드 설명
__construct ( OneLogin_Saml2_Settings $settings, string $response ) Constructs the SAML Response object.
checkOneAuthnStatement ( ) : boolean Checks that the samlp:Response/saml:Assertion/saml:AuthnStatement element exists and is unique.
checkOneCondition ( ) : boolean Checks that the samlp:Response/saml:Assertion/saml:Conditions element exists and is unique.
checkStatus ( ) Checks if the Status is success
getAttributes ( ) : array Gets the Attributes from the AttributeStatement element.
getAudiences ( ) : array Gets the audiences.
getError ( ) * After execute a validation process, if fails this method returns the cause
getIssuers ( ) : array Gets the Issuers (from Response and Assertion).
getNameId ( ) : string Gets the NameID provided by the SAML response from the IdP.
getNameIdData ( ) : array Gets the NameID Data provided by the SAML response from the IdP.
getNameIdFormat ( ) : string Gets the NameID Format provided by the SAML response from the IdP.
getSessionIndex ( ) : string | null Gets the SessionIndex from the AuthnStatement.
getSessionNotOnOrAfter ( ) : integer | null Gets the SessionNotOnOrAfter from the AuthnStatement.
isValid ( string | null $requestId = null ) : boolean Determines if the SAML Response is valid using the certificate.
processSignedElements ( ) : array Verifies the signature nodes: - Checks that are Response or Assertion - Check that IDs and reference URI are unique and consistent.
validateNumAssertions ( ) : boolean Verifies that the document only contains a single Assertion (encrypted or not).
validateSignedElements ( $signedElements ) : boolean Verifies that the document has the expected signed nodes.
validateTimestamps ( ) : boolean Verifies that the document is still valid according Conditions Element.

보호된 메소드들

메소드 설명
_decryptAssertion ( DomNode $dom ) : DOMDocument Decrypts the Assertion (DOMDocument)
_queryAssertion ( string $assertionXpath ) : DOMNodeList Extracts a node from the DOMDocument (Assertion).

비공개 메소드들

메소드 설명
_query ( string $query ) : DOMNodeList Extracts nodes that match the query from the DOMDocument (Response Menssage)

메소드 상세

__construct() 공개 메소드

Constructs the SAML Response object.
public __construct ( OneLogin_Saml2_Settings $settings, string $response )
$settings OneLogin_Saml2_Settings Settings.
$response string A UUEncoded SAML response from the IdP.

_decryptAssertion() 보호된 메소드

Decrypts the Assertion (DOMDocument)
protected _decryptAssertion ( DomNode $dom ) : DOMDocument
$dom DomNode DomDocument
리턴 DOMDocument Decrypted Assertion

_queryAssertion() 보호된 메소드

Extracts a node from the DOMDocument (Assertion).
protected _queryAssertion ( string $assertionXpath ) : DOMNodeList
$assertionXpath string Xpath Expresion
리턴 DOMNodeList The queried node

checkOneAuthnStatement() 공개 메소드

Checks that the samlp:Response/saml:Assertion/saml:AuthnStatement element exists and is unique.
public checkOneAuthnStatement ( ) : boolean
리턴 boolean true if the AuthnStatement element exists and is unique

checkOneCondition() 공개 메소드

Checks that the samlp:Response/saml:Assertion/saml:Conditions element exists and is unique.
public checkOneCondition ( ) : boolean
리턴 boolean true if the Conditions element exists and is unique

checkStatus() 공개 메소드

Checks if the Status is success
public checkStatus ( )

getAttributes() 공개 메소드

Gets the Attributes from the AttributeStatement element.
public getAttributes ( ) : array
리턴 array The attributes of the SAML Assertion

getAudiences() 공개 메소드

Gets the audiences.
public getAudiences ( ) : array
리턴 array @audience The valid audiences of the response

getError() 공개 메소드

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

getIssuers() 공개 메소드

Gets the Issuers (from Response and Assertion).
public getIssuers ( ) : array
리턴 array @issuers The issuers of the assertion/response

getNameId() 공개 메소드

Gets the NameID provided by the SAML response from the IdP.
public getNameId ( ) : string
리턴 string Name ID Value

getNameIdData() 공개 메소드

Gets the NameID Data provided by the SAML response from the IdP.
public getNameIdData ( ) : array
리턴 array Name ID Data (Value, Format, NameQualifier, SPNameQualifier)

getNameIdFormat() 공개 메소드

Gets the NameID Format provided by the SAML response from the IdP.
public getNameIdFormat ( ) : string
리턴 string Name ID Format

getSessionIndex() 공개 메소드

Could be used to be stored in the local session in order to be used in a future Logout Request that the SP could send to the SP, to set what specific session must be deleted
public getSessionIndex ( ) : string | null
리턴 string | null The SessionIndex value

getSessionNotOnOrAfter() 공개 메소드

Could be used to set the local session expiration
public getSessionNotOnOrAfter ( ) : integer | null
리턴 integer | null The SessionNotOnOrAfter value

isValid() 공개 메소드

Determines if the SAML Response is valid using the certificate.
public isValid ( string | null $requestId = null ) : boolean
$requestId string | null The ID of the AuthNRequest sent by this SP to the IdP
리턴 boolean Validate the document

processSignedElements() 공개 메소드

Verifies the signature nodes: - Checks that are Response or Assertion - Check that IDs and reference URI are unique and consistent.
public processSignedElements ( ) : array
리턴 array Signed element tags

validateNumAssertions() 공개 메소드

Verifies that the document only contains a single Assertion (encrypted or not).
public validateNumAssertions ( ) : boolean
리턴 boolean TRUE if the document passes.

validateSignedElements() 공개 메소드

Verifies that the document has the expected signed nodes.
public validateSignedElements ( $signedElements ) : boolean
리턴 boolean

validateTimestamps() 공개 메소드

Verifies that the document is still valid according Conditions Element.
public validateTimestamps ( ) : boolean
리턴 boolean

프로퍼티 상세

$_settings 보호되어 있는 프로퍼티

Settings
protected OneLogin_Saml2_Settings $_settings
리턴 OneLogin_Saml2_Settings

$decryptedDocument 공개적으로 프로퍼티

A DOMDocument class loaded from the SAML Response (Decrypted).
public DomDocument $decryptedDocument
리턴 DomDocument

$document 공개적으로 프로퍼티

A DOMDocument class loaded from the SAML Response.
public DomDocument $document
리턴 DomDocument

$encrypted 공개적으로 프로퍼티

The response contains an encrypted assertion.
public bool $encrypted
리턴 boolean

$response 공개적으로 프로퍼티

The decoded, unprocessed XML response provided to the constructor.
public string $response
리턴 string