ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
IdentityProvider.php
Go to the documentation of this file.
1<?php
2
3namespace SAML2\Configuration;
4
8class 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
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
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}
An exception for terminatinating execution or to throw for unit testing.
Default implementation for configuration.
Definition: ArrayAdapter.php:9
Basic configuration wrapper.
getPrivateKey($name, $required=false)
getCertificateFile()
Returns the full path to the (local) file that contains the X509 pem certificate.
getKeys()
Returns an array or \Traversable of keys, where each element represents a configured key.
getCertificateData()
Returns the contents of an X509 pem certificate, without the '--—BEGIN CERTIFICATE--—' and '--—END CE...
Configuration of a private key.
Definition: PrivateKey.php:11
$key
Definition: croninfo.php:18
Interface \SAML2\Configuration\EntityIdProvider.