PHP 클래스 SAML2\SignedElementHelper

Can either be inherited from, or can be used by proxy.
상속: implements saml2\SignedElement
파일 보기 프로젝트 열기: simplesamlphp/saml2 1 사용 예제들

공개 메소드들

메소드 설명
addValidator ( callback $function, mixed $data ) Add a method for validating this element.
getCertificates ( ) : array Retrieve the certificates that are included in the message.
getSignatureKey ( ) : XMLSecurityKey | null Retrieve the private key we should use to sign the message.
getValidatingCertificates ( ) : array Retrieve certificates that sign this element.
setCertificates ( array $certificates ) Set the certificates that should be included in the message.
setSignatureKey ( XMLsecurityKey $signatureKey = null ) Set the private key we should use to sign the message.
validate ( XMLSecurityKey $key ) : boolean Validate this element against a public key.

보호된 메소드들

메소드 설명
__construct ( DOMElement $xml = null ) Initialize the helper class.
signElement ( DOMElement $root, DOMElement $insertBefore = null ) : DOMElement | null Sign the given XML element.

메소드 상세

__construct() 보호된 메소드

Initialize the helper class.
protected __construct ( DOMElement $xml = null )
$xml DOMElement The XML element which may be signed.

addValidator() 공개 메소드

This function is used for custom validation extensions
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.

getCertificates() 공개 메소드

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

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.

getValidatingCertificates() 공개 메소드

Retrieve certificates that sign this element.
public getValidatingCertificates ( ) : array
리턴 array Array with certificates.

setCertificates() 공개 메소드

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

setSignatureKey() 공개 메소드

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

signElement() 보호된 메소드

Sign the given XML element.
protected signElement ( DOMElement $root, DOMElement $insertBefore = null ) : DOMElement | null
$root DOMElement The element we should sign.
$insertBefore DOMElement The element we should insert the signature node before.
리턴 DOMElement | null

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.