PHP 클래스 SAML2\Message

Implements what is common between the samlp:RequestAbstractType and samlp:StatusResponseType element types.
상속: implements saml2\SignedElement
파일 보기 프로젝트 열기: simplesamlphp/saml2 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$document DOMDocument This variable is used while generating XML from this message. It holds the \DOMDocument of the XML we are generating.
$extensions array Request extensions.
$messageContainedSignatureUponConstruction boolean

공개 메소드들

메소드 설명
addValidator ( callback $function, mixed $data ) Add a method for validating this message.
fromXML ( DOMElement $xml ) : Message Convert an XML element into a message.
getCertificates ( ) : array Retrieve the certificates that are included in the message.
getConsent ( ) : string Set the given consent for this message.
getDestination ( ) : string | null Retrieve the destination of this message.
getExtensions ( ) : SAML2\XML\samlp\Extensions Retrieve the Extensions.
getId ( ) : string Retrieve the identifier of this message.
getIssueInstant ( ) : integer Retrieve the issue timestamp of this message.
getIssuer ( ) : string | Issuer | null Retrieve the issuer if this message.
getRelayState ( ) : string | null Retrieve the RelayState associated with this message.
getSignatureKey ( ) : XMLSecurityKey | null Retrieve the private key we should use to sign the message.
getSignatureMethod ( ) : null | string
isMessageConstructedWithSignature ( ) : boolean Query whether or not the message contained a signature at the root level when the object was constructed.
setCertificates ( array $certificates ) Set the certificates that should be included in the message.
setConsent ( string $consent ) Set the given consent for this message.
setDestination ( string | null $destination ) Set the destination of this message.
setExtensions ( array | null $extensions ) Set the Extensions.
setId ( string $id ) Set the identifier of this message.
setIssueInstant ( integer $issueInstant ) Set the issue timestamp of this message.
setIssuer ( string | Issuer | null $issuer ) Set the issuer of this message.
setRelayState ( string | null $relayState ) Set the RelayState associated with this message.
setSignatureKey ( XMLsecurityKey $signatureKey = null ) Set the private key we should use to sign the message.
toSignedXML ( ) : DOMElement Convert this message to a signed XML document.
toUnsignedXML ( ) : DOMElement Convert this message to an unsigned XML document.
validate ( XMLSecurityKey $key ) : boolean Validate this message against a public key.

보호된 메소드들

메소드 설명
__construct ( string $tagName, DOMElement $xml = null ) Initialize a message.

비공개 메소드들

메소드 설명
validateSignature ( DOMElement $xml ) Validate the signature element of a SAML message, and configure this object appropriately to perform the signature verification afterwards.

메소드 상세

__construct() 보호된 메소드

This constructor takes an optional parameter with a \DOMElement. If this parameter is given, the message will be initialized with data from that XML element. If no XML element is given, the message is initialized with suitable default values.
protected __construct ( string $tagName, DOMElement $xml = null )
$tagName string The tag name of the root element
$xml DOMElement The input message

addValidator() 공개 메소드

This function is used by the HTTP-Redirect binding, to make it possible to check the signature against the one included in the query string.
public addValidator ( callback $function, mixed $data )
$function callback The function which should be called
$data mixed The data that should be included as the first parameter to the function

fromXML() 공개 정적인 메소드

Convert an XML element into a message.
public static fromXML ( DOMElement $xml ) : Message
$xml DOMElement The root XML element
리턴 Message The message

getCertificates() 공개 메소드

Retrieve the certificates that are included in the message.
public getCertificates ( ) : array
리턴 array An array of certificates

getConsent() 공개 메소드

Most likely (though not required) a value of rn:oasis:names:tc:SAML:2.0:consent.
또한 보기: SAML2\Constants
public getConsent ( ) : string
리턴 string Consent

getDestination() 공개 메소드

Retrieve the destination of this message.
public getDestination ( ) : string | null
리턴 string | null The destination of this message, or NULL if no destination is given

getExtensions() 공개 메소드

Retrieve the Extensions.
public getExtensions ( ) : SAML2\XML\samlp\Extensions
리턴 SAML2\XML\samlp\Extensions

getId() 공개 메소드

Retrieve the identifier of this message.
public getId ( ) : string
리턴 string The identifier of this message

getIssueInstant() 공개 메소드

Retrieve the issue timestamp of this message.
public getIssueInstant ( ) : integer
리턴 integer The issue timestamp of this message, as an UNIX timestamp

getIssuer() 공개 메소드

Retrieve the issuer if this message.
public getIssuer ( ) : string | Issuer | null
리턴 string | SAML2\XML\saml\Issuer | null The issuer of this message, or NULL if no issuer is given

getRelayState() 공개 메소드

Retrieve the RelayState associated with this message.
public getRelayState ( ) : string | null
리턴 string | null The RelayState, or NULL if no RelayState is given

getSignatureKey() 공개 메소드

Retrieve the private key we should use to sign the message.
public getSignatureKey ( ) : XMLSecurityKey | null
리턴 RobRichards\XMLSecLibs\XMLSecurityKey | null The key, or NULL if no key is specified

getSignatureMethod() 공개 메소드

public getSignatureMethod ( ) : null | string
리턴 null | string

isMessageConstructedWithSignature() 공개 메소드

Query whether or not the message contained a signature at the root level when the object was constructed.

setCertificates() 공개 메소드

The certificates should be strings with the PEM encoded data.
public setCertificates ( array $certificates )
$certificates array An array of certificates

setConsent() 공개 메소드

Most likely (though not required) a value of rn:oasis:names:tc:SAML:2.0:consent.
또한 보기: SAML2\Constants
public setConsent ( string $consent )
$consent string

setDestination() 공개 메소드

Set the destination of this message.
public setDestination ( string | null $destination )
$destination string | null The new destination of this message

setExtensions() 공개 메소드

Set the Extensions.
public setExtensions ( array | null $extensions )
$extensions array | null The Extensions

setId() 공개 메소드

Set the identifier of this message.
public setId ( string $id )
$id string The new identifier of this message

setIssueInstant() 공개 메소드

Set the issue timestamp of this message.
public setIssueInstant ( integer $issueInstant )
$issueInstant integer The new issue timestamp of this message, as an UNIX timestamp

setIssuer() 공개 메소드

Set the issuer of this message.
public setIssuer ( string | Issuer | null $issuer )
$issuer string | SAML2\XML\saml\Issuer | null The new issuer of this message

setRelayState() 공개 메소드

Set the RelayState associated with this message.
public setRelayState ( string | null $relayState )
$relayState string | null The new RelayState

setSignatureKey() 공개 메소드

If the key is null, the message will be sent unsigned.
public setSignatureKey ( XMLsecurityKey $signatureKey = null )
$signatureKey XMLsecurityKey

toSignedXML() 공개 메소드

This method sign the resulting XML document if the private key for the signature is set.
public toSignedXML ( ) : DOMElement
리턴 DOMElement The root element of the DOM tree

toUnsignedXML() 공개 메소드

This method does not sign the resulting XML document.
public toUnsignedXML ( ) : DOMElement
리턴 DOMElement The root element of the DOM tree

validate() 공개 메소드

true is returned on success, false is returned if we don't have any signature we can validate. An exception is thrown if the signature validation fails.
public validate ( XMLSecurityKey $key ) : boolean
$key RobRichards\XMLSecLibs\XMLSecurityKey The key we should check against
리턴 boolean true on success, false when we don't have a signature

프로퍼티 상세

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

This variable is used while generating XML from this message. It holds the \DOMDocument of the XML we are generating.
protected DOMDocument $document
리턴 DOMDocument

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

Request extensions.
protected array $extensions
리턴 array

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

protected bool $messageContainedSignatureUponConstruction
리턴 boolean