TIME_VALID
TIME_VALID
Metadata lib of PHP Toolkit
builder(array $sp, boolean|string $authnsign = false, boolean|string $wsign = false, \DateTime|null $validUntil = null, integer|null $cacheDuration = null, array $contacts = array(), array $organization = array(), array $attributes = array()) : string
Generates the metadata of the SP based on the settings
| array | $sp | The SP data |
| boolean|string | $authnsign | authnRequestsSigned attribute |
| boolean|string | $wsign | wantAssertionsSigned attribute |
| \DateTime|null | $validUntil | Metadata's valid time |
| integer|null | $cacheDuration | Duration of the cache in seconds |
| array | $contacts | Contacts info |
| array | $organization | Organization ingo |
| array | $attributes |
SAML Metadata XML
signMetadata(string $metadata, string $key, string $cert, string $signAlgorithm = \XMLSecurityKey::RSA_SHA1, string $digestAlgorithm = \XMLSecurityDSig::SHA1) : string
Signs the metadata with the key/cert provided
| string | $metadata | SAML Metadata XML |
| string | $key | x509 key |
| string | $cert | x509 cert |
| string | $signAlgorithm | Signature algorithm method |
| string | $digestAlgorithm | Digest algorithm method |
Signed Metadata
addX509KeyDescriptors(string $metadata, string $cert, boolean $wantsEncrypted = true) : string
Adds the x509 descriptors (sign/encriptation) to the metadata The same cert will be used for sign/encrypt
| string | $metadata | SAML Metadata XML |
| string | $cert | x509 cert |
| boolean | $wantsEncrypted | Whether to include the KeyDescriptor for encryption |
Metadata with KeyDescriptors