ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SAML2\Configuration\IdentityProvider Class Reference

Basic configuration wrapper. More...

+ Inheritance diagram for SAML2\Configuration\IdentityProvider:
+ Collaboration diagram for SAML2\Configuration\IdentityProvider:

Public Member Functions

 getKeys ()
 Returns an array or \Traversable of keys, where each element represents a configured key. More...
 
 getCertificateData ()
 Returns the contents of an X509 pem certificate, without the '--—BEGIN CERTIFICATE--—' and '--—END CERTIFICATE--—'. More...
 
 getCertificateFile ()
 Returns the full path to the (local) file that contains the X509 pem certificate. More...
 
 getCertificateFingerprints ()
 
 isAssertionEncryptionRequired ()
 
 getSharedKey ()
 
 hasBase64EncodedAttributes ()
 
 getPrivateKey ($name, $required=false)
 
 getBlacklistedAlgorithms ()
 
 getEntityId ()
 
- Public Member Functions inherited from SAML2\Configuration\ArrayAdapter
 __construct (array $configuration)
 
 get ($key, $defaultValue=null)
 Query to get the value in the configuration for the given key. More...
 
 has ($key)
 Query for whether or not the configuration has a value for the key. More...
 
 has ($key)
 Query for whether or not the configuration has a value for the key. More...
 
 get ($key, $default=null)
 Query to get the value in the configuration for the given key. More...
 
 getKeys ()
 Returns an array or \Traversable of keys, where each element represents a configured key. More...
 
 getCertificateData ()
 Returns the contents of an X509 pem certificate, without the '--—BEGIN CERTIFICATE--—' and '--—END CERTIFICATE--—'. More...
 
 getCertificateFile ()
 Returns the full path to the (local) file that contains the X509 pem certificate. More...
 
 getCertificateFingerprints ()
 Returns an array or \Traversable where each element represents a certificate fingerprint. More...
 
 isAssertionEncryptionRequired ()
 
 getSharedKey ()
 
 getPrivateKey ($name, $required=false)
 
 getBlacklistedAlgorithms ()
 
 getEntityId ()
 

Detailed Description

Basic configuration wrapper.

Definition at line 8 of file IdentityProvider.php.

Member Function Documentation

◆ getBlacklistedAlgorithms()

SAML2\Configuration\IdentityProvider::getBlacklistedAlgorithms ( )
Returns
array

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 75 of file IdentityProvider.php.

76 {
77 return $this->get('blacklistedEncryptionAlgorithms');
78 }

◆ getCertificateData()

SAML2\Configuration\IdentityProvider::getCertificateData ( )

Returns the contents of an X509 pem certificate, without the '--—BEGIN CERTIFICATE--—' and '--—END CERTIFICATE--—'.

Returns
null|string

Implements SAML2\Configuration\CertificateProvider.

Definition at line 18 of file IdentityProvider.php.

19 {
20 return $this->get('certificateData');
21 }

◆ getCertificateFile()

SAML2\Configuration\IdentityProvider::getCertificateFile ( )

Returns the full path to the (local) file that contains the X509 pem certificate.

Returns
null|string

Implements SAML2\Configuration\CertificateProvider.

Definition at line 23 of file IdentityProvider.php.

24 {
25 return $this->get('certificateFile');
26 }

◆ getCertificateFingerprints()

SAML2\Configuration\IdentityProvider::getCertificateFingerprints ( )
Deprecated:
Please use getCertifiateFile() or getCertificateData()

Implements SAML2\Configuration\CertificateProvider.

Definition at line 31 of file IdentityProvider.php.

32 {
33 return $this->get('certificateFingerprints');
34 }

◆ getEntityId()

SAML2\Configuration\IdentityProvider::getEntityId ( )
Returns
null|string

Implements SAML2\Configuration\EntityIdProvider.

Definition at line 83 of file IdentityProvider.php.

84 {
85 return $this->get('entityId');
86 }

◆ getKeys()

SAML2\Configuration\IdentityProvider::getKeys ( )

Returns an array or \Traversable of keys, where each element represents a configured key.

A configured key itself is an array or object implementing ArrayAccess where the array key/property is the configuration key and the value is the configured value.

Returns
null|array|\Traversable

Implements SAML2\Configuration\CertificateProvider.

Definition at line 13 of file IdentityProvider.php.

14 {
15 return $this->get('keys');
16 }

◆ getPrivateKey()

SAML2\Configuration\IdentityProvider::getPrivateKey (   $name,
  $required = false 
)
Parameters
string$namethe name of the private key
boolean$requiredwhether or not the private key must exist
Returns
mixed

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 51 of file IdentityProvider.php.

52 {
53 $privateKeys = $this->get('privateKeys');
54 $key = array_filter($privateKeys, function (PrivateKey $key) use ($name) {
55 return $key->getName() === $name;
56 });
57
58 $keyCount = count($key);
59 if ($keyCount !== 1 && $required) {
60 throw new \RuntimeException(sprintf(
61 'Attempted to get privateKey by name "%s", found "%d" keys, where only one was expected. Please '
62 . 'verify that your configuration is correct',
63 $name,
64 $keyCount
65 ));
66 }
67
68 if (!$keyCount) {
69 return null;
70 }
71
72 return array_pop($key);
73 }
$key
Definition: croninfo.php:18

References $key, and $name.

◆ getSharedKey()

SAML2\Configuration\IdentityProvider::getSharedKey ( )
Returns
null|string

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 41 of file IdentityProvider.php.

42 {
43 return $this->get('sharedKey');
44 }

◆ hasBase64EncodedAttributes()

SAML2\Configuration\IdentityProvider::hasBase64EncodedAttributes ( )

Definition at line 46 of file IdentityProvider.php.

47 {
48 return $this->get('base64EncodedAttributes');
49 }

◆ isAssertionEncryptionRequired()

SAML2\Configuration\IdentityProvider::isAssertionEncryptionRequired ( )
Returns
null|bool

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 36 of file IdentityProvider.php.

37 {
38 return $this->get('assertionEncryptionEnabled');
39 }

The documentation for this class was generated from the following file: