ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
IdentityProvider.php
Go to the documentation of this file.
1 <?php
2 
3 namespace SAML2\Configuration;
4 
8 class IdentityProvider extends ArrayAdapter implements
12 {
13  public function getKeys()
14  {
15  return $this->get('keys');
16  }
17 
18  public function getCertificateData()
19  {
20  return $this->get('certificateData');
21  }
22 
23  public function getCertificateFile()
24  {
25  return $this->get('certificateFile');
26  }
27 
31  public function getCertificateFingerprints()
32  {
33  return $this->get('certificateFingerprints');
34  }
35 
37  {
38  return $this->get('assertionEncryptionEnabled');
39  }
40 
41  public function getSharedKey()
42  {
43  return $this->get('sharedKey');
44  }
45 
46  public function hasBase64EncodedAttributes()
47  {
48  return $this->get('base64EncodedAttributes');
49  }
50 
51  public function getPrivateKey($name, $required = false)
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  }
74 
75  public function getBlacklistedAlgorithms()
76  {
77  return $this->get('blacklistedEncryptionAlgorithms');
78  }
79 
83  public function getEntityId()
84  {
85  return $this->get('entityId');
86  }
87 }
Basic configuration wrapper.
CertificateProvider interface.
Configuration of a private key.
Definition: PrivateKey.php:10
getCertificateData()
Returns the contents of an X509 pem certificate, without the &#39;--—BEGIN CERTIFICATE--—&#39; and &#39;--—END...
getPrivateKey($name, $required=false)
Default implementation for configuration.
Definition: ArrayAdapter.php:8
getKeys()
Returns an array or of keys, where each element represents a configured key.
$key
Definition: croninfo.php:18
getCertificateFile()
Returns the full path to the (local) file that contains the X509 pem certificate. ...