ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SAML2\Configuration\ServiceProvider Class Reference

Basic Configuration Wrapper. More...

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

Public Member Functions

 getKeys ()
 Returns an array or 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 ()
 
 getEntityId ()
 
 isAssertionEncryptionRequired ()
 
 getSharedKey ()
 
 getPrivateKey ($name, $required=false)
 
 getBlacklistedAlgorithms ()
 
- 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...
 

Detailed Description

Basic Configuration Wrapper.

Definition at line 10 of file ServiceProvider.php.

Member Function Documentation

◆ getBlacklistedAlgorithms()

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

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 77 of file ServiceProvider.php.

References array, and RobRichards\XMLSecLibs\XMLSecurityKey\RSA_1_5.

78  {
79  return $this->get('blacklistedEncryptionAlgorithms', array(XMLSecurityKey::RSA_1_5));
80  }
Create styles array
The data for the language used.

◆ getCertificateData()

SAML2\Configuration\ServiceProvider::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 20 of file ServiceProvider.php.

21  {
22  return $this->get('certificateData');
23  }

◆ getCertificateFile()

SAML2\Configuration\ServiceProvider::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 25 of file ServiceProvider.php.

26  {
27  return $this->get('certificateFile');
28  }

◆ getCertificateFingerprints()

SAML2\Configuration\ServiceProvider::getCertificateFingerprints ( )
Deprecated:
Please use getCertificateData() or getCertificateFile().

Implements SAML2\Configuration\CertificateProvider.

Definition at line 33 of file ServiceProvider.php.

34  {
35  return $this->get('certificateFingerprints');
36  }

◆ getEntityId()

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

Implements SAML2\Configuration\EntityIdProvider.

Definition at line 38 of file ServiceProvider.php.

39  {
40  return $this->get('entityId');
41  }

◆ getKeys()

SAML2\Configuration\ServiceProvider::getKeys ( )

Returns an array or 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|

Implements SAML2\Configuration\CertificateProvider.

Definition at line 15 of file ServiceProvider.php.

16  {
17  return $this->get('keys');
18  }

◆ getPrivateKey()

SAML2\Configuration\ServiceProvider::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 53 of file ServiceProvider.php.

References $key, $name, and SAML2\Configuration\PrivateKey\getName().

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

◆ getSharedKey()

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

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 48 of file ServiceProvider.php.

49  {
50  return $this->get('sharedKey');
51  }

◆ isAssertionEncryptionRequired()

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

Implements SAML2\Configuration\DecryptionProvider.

Definition at line 43 of file ServiceProvider.php.

44  {
45  return $this->get('assertionEncryptionEnabled');
46  }

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