PHP Class SAML2\Certificate\KeyLoader

Show file Open project: simplesamlphp/saml2 Class Usage Examples

Public Methods

Method Description
__construct ( )
extractPublicKeys ( SAML2\Configuration\CertificateProvider $config, null $usage = null, boolean $required = false, string $prefix = '' ) : SAML2\Certificate\KeyCollection Extracts the public keys given by the configuration. Mainly exists for BC purposes.
getKeys ( ) : SAML2\Certificate\KeyCollection
hasKeys ( ) : boolean
loadCertificateData ( string $certificateData ) Attempts to load a key based on the given certificateData
loadCertificateFile ( string $certificateFile ) Loads the certificate in the file given
loadKeys ( array $configuredKeys, $usage ) Loads the keys given, optionally excluding keys when a usage is given and they are not configured to be used with the usage given
loadKeysFromConfiguration ( SAML2\Configuration\CertificateProvider $config, null | string $usage = null, boolean $required = false ) : SAML2\Certificate\KeyCollection

Method Details

__construct() public method

public __construct ( )

extractPublicKeys() public static method

Prioritisation order is keys > certData > certificate
public static extractPublicKeys ( SAML2\Configuration\CertificateProvider $config, null $usage = null, boolean $required = false, string $prefix = '' ) : SAML2\Certificate\KeyCollection
$config SAML2\Configuration\CertificateProvider
$usage null
$required boolean
$prefix string
return SAML2\Certificate\KeyCollection

getKeys() public method

public getKeys ( ) : SAML2\Certificate\KeyCollection
return SAML2\Certificate\KeyCollection

hasKeys() public method

public hasKeys ( ) : boolean
return boolean

loadCertificateData() public method

Attempts to load a key based on the given certificateData
public loadCertificateData ( string $certificateData )
$certificateData string

loadCertificateFile() public method

Loads the certificate in the file given
public loadCertificateFile ( string $certificateFile )
$certificateFile string the full path to the cert file.

loadKeys() public method

Loads the keys given, optionally excluding keys when a usage is given and they are not configured to be used with the usage given
public loadKeys ( array $configuredKeys, $usage )
$configuredKeys array
$usage

loadKeysFromConfiguration() public method

public loadKeysFromConfiguration ( SAML2\Configuration\CertificateProvider $config, null | string $usage = null, boolean $required = false ) : SAML2\Certificate\KeyCollection
$config SAML2\Configuration\CertificateProvider
$usage null | string
$required boolean
return SAML2\Certificate\KeyCollection