Backwards compatibility helper for SimpleSAMLphp.
More...
Backwards compatibility helper for SimpleSAMLphp.
Definition at line 10 of file SimpleSAMLConverter.php.
◆ convertToIdentityProvider()
static SAML2\Configuration\SimpleSAMLConverter::convertToIdentityProvider |
( |
SimpleSAML_Configuration |
$configuration, |
|
|
|
$certificatePrefix = '' |
|
) |
| |
|
static |
- Parameters
-
\SimpleSAML_Configuration | $configuration | |
string | $certificatePrefix | |
- Returns
Definition at line 18 of file SimpleSAMLConverter.php.
22 $pluckedConfiguration = static::pluckConfiguration($configuration, $certificatePrefix);
23 static::enrichForDecryptionProvider($configuration, $pluckedConfiguration);
24 static::enrichForIdentityProvider($configuration, $pluckedConfiguration);
26 return new IdentityProvider($pluckedConfiguration);
◆ convertToServiceProvider()
static SAML2\Configuration\SimpleSAMLConverter::convertToServiceProvider |
( |
SimpleSAML_Configuration |
$configuration, |
|
|
|
$certificatePrefix = '' |
|
) |
| |
|
static |
- Parameters
-
\SimpleSAML_Configuration | $configuration | |
string | $certificatePrefix | |
- Returns
Definition at line 35 of file SimpleSAMLConverter.php.
39 $pluckedConfiguration = static::pluckConfiguration($configuration, $certificatePrefix);
40 static::enrichForServiceProvider($configuration, $pluckedConfiguration);
41 static::enrichForDecryptionProvider($configuration, $pluckedConfiguration);
43 return new ServiceProvider($pluckedConfiguration);
◆ enrichForDecryptionProvider()
static SAML2\Configuration\SimpleSAMLConverter::enrichForDecryptionProvider |
( |
SimpleSAML_Configuration |
$configuration, |
|
|
array & |
$baseConfiguration |
|
) |
| |
|
staticprivate |
Definition at line 100 of file SimpleSAMLConverter.php.
References SimpleSAML_Configuration\getBoolean(), SimpleSAML_Configuration\getString(), SAML2\Configuration\PrivateKey\NAME_DEFAULT, and SAML2\Configuration\PrivateKey\NAME_NEW.
104 if ($configuration->has(
'sharedKey')) {
105 $baseConfiguration[
'sharedKey'] = $configuration->
getString(
'sharedKey', null);
108 if ($configuration->has(
'new_privatekey')) {
109 $baseConfiguration[
'privateKeys'][] =
new PrivateKey(
110 $configuration->
getString(
'new_privatekey'),
112 $configuration->
getString(
'new_privatekey_pass', null)
116 if ($configuration->
getBoolean(
'assertion.encryption',
false)) {
117 $baseConfiguration[
'privateKeys'][] =
new PrivateKey(
120 $configuration->
getString(
'privatekey_pass', null)
123 if ($configuration->has(
'encryption.blacklisted-algorithms')) {
124 $baseConfiguration[
'blacklistedEncryptionAlgorithms'] = $configuration
125 ->get(
'encryption.blacklisted-algorithms');
getBoolean($name, $default=self::REQUIRED_OPTION)
This function retrieves a boolean configuration option.
getString($name, $default=self::REQUIRED_OPTION)
This function retrieves a string configuration option.
◆ enrichForIdentityProvider()
static SAML2\Configuration\SimpleSAMLConverter::enrichForIdentityProvider |
( |
SimpleSAML_Configuration |
$configuration, |
|
|
& |
$baseConfiguration |
|
) |
| |
|
staticprivate |
◆ enrichForServiceProvider()
static SAML2\Configuration\SimpleSAMLConverter::enrichForServiceProvider |
( |
SimpleSAML_Configuration |
$configuration, |
|
|
& |
$baseConfiguration |
|
) |
| |
|
staticprivate |
◆ pluckConfiguration()
static SAML2\Configuration\SimpleSAMLConverter::pluckConfiguration |
( |
SimpleSAML_Configuration |
$configuration, |
|
|
|
$prefix = '' |
|
) |
| |
|
staticprivate |
- Parameters
-
\SimpleSAML_Configuration | $configuration | |
string | $prefix | |
- Returns
- array
Definition at line 52 of file SimpleSAMLConverter.php.
References array, SimpleSAML_Configuration\getArray(), SimpleSAML_Configuration\getArrayizeString(), SimpleSAML_Configuration\getBoolean(), SimpleSAML_Configuration\getString(), and SimpleSAML_Configuration\hasValue().
58 if ($configuration->
hasValue($prefix .
'keys')) {
59 $extracted[
'keys'] = $configuration->
getArray($prefix .
'keys');
64 if ($configuration->
hasValue($prefix .
'certData')) {
65 $extracted[
'certificateData'] = $configuration->
getString($prefix .
'certData');
70 if ($configuration->
hasValue($prefix .
'certificate')) {
71 $extracted[
'certificateData'] = $configuration->
getString($prefix .
'certificate');
76 if ($configuration->
hasValue($prefix .
'certFingerprint')) {
77 $extracted[
'certificateFingerprint'] = $configuration->
getArrayizeString(
'certFingerprint');
80 $extracted[
'assertionEncryptionEnabled'] = $configuration->
getBoolean(
'assertion.encryption',
false);
82 if ($configuration->has(
'sharedKey')) {
83 $extracted[
'sharedKey'] = $configuration->
getString(
'sharedKey');
getArray($name, $default=self::REQUIRED_OPTION)
This function retrieves an array configuration option.
hasValue($name)
Check whether a key in the configuration exists or not.
getBoolean($name, $default=self::REQUIRED_OPTION)
This function retrieves a boolean configuration option.
getArrayizeString($name, $default=self::REQUIRED_OPTION)
This function retrieves a configuration option with a string or an array of strings.
Create styles array
The data for the language used.
getString($name, $default=self::REQUIRED_OPTION)
This function retrieves a string configuration option.
The documentation for this class was generated from the following file: