ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
DecodeBase64Transformer.php
Go to the documentation of this file.
1
<?php
2
3
namespace
SAML2\Assertion\Transformer
;
4
5
use
SAML2\Assertion
;
6
use
SAML2\Configuration\IdentityProvider
;
7
use
SAML2\Configuration\IdentityProviderAware
;
8
9
class
DecodeBase64Transformer
implements
10
Transformer
,
11
IdentityProviderAware
12
{
16
private
$identityProvider
;
17
18
public
function
setIdentityProvider
(
IdentityProvider
$identityProvider
)
19
{
20
$this->identityProvider =
$identityProvider
;
21
}
22
23
public
function
transform
(
Assertion
$assertion)
24
{
25
if
(!$this->identityProvider->hasBase64EncodedAttributes()) {
26
return
$assertion;
27
}
28
29
$attributes
= $assertion->
getAttributes
();
30
$keys
= array_keys(
$attributes
);
31
$decoded = array_map(
array
($this,
'decodeValue'
),
$attributes
);
32
33
$attributes
= array_combine(
$keys
, $decoded);
34
35
$assertion->
setAttributes
(
$attributes
);
36
}
37
44
private
function
decodeValue
($value)
45
{
46
$elements = explode(
'_'
, $value);
47
return
array_map(
'base64_decode'
, $elements);
48
}
49
}
SAML2\Assertion\setAttributes
setAttributes(array $attributes)
Replace all attributes.
Definition:
Assertion.php:1205
SAML2\Configuration\IdentityProvider
Basic configuration wrapper.
Definition:
IdentityProvider.php:8
SAML2\Assertion
Definition:
Assertion.php:17
$keys
$keys
Definition:
memcacheSync.php:38
IdentityProvider
SAML2\Assertion
Definition:
Decrypter.php:3
SAML2\Assertion\getAttributes
getAttributes()
Retrieve all attributes.
Definition:
Assertion.php:1195
SAML2\Assertion\Transformer\Transformer
Definition:
Transformer.php:7
IdentityProviderAware
SAML2\Assertion\Transformer\DecodeBase64Transformer\setIdentityProvider
setIdentityProvider(IdentityProvider $identityProvider)
Definition:
DecodeBase64Transformer.php:18
SAML2\Assertion\$attributes
$attributes
Definition:
Assertion.php:174
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
SAML2\Assertion\Transformer\DecodeBase64Transformer\transform
transform(Assertion $assertion)
Definition:
DecodeBase64Transformer.php:23
SAML2\Configuration\IdentityProviderAware
Interface for triggering setter injection.
Definition:
IdentityProviderAware.php:8
SAML2\Assertion\Transformer\DecodeBase64Transformer\decodeValue
decodeValue($value)
Definition:
DecodeBase64Transformer.php:44
SAML2\Assertion\Transformer
Definition:
DecodeBase64Transformer.php:3
SAML2\Assertion\Transformer\DecodeBase64Transformer
Definition:
DecodeBase64Transformer.php:9
SAML2\Assertion\Transformer\DecodeBase64Transformer\$identityProvider
$identityProvider
Definition:
DecodeBase64Transformer.php:16
libs
composer
vendor
simplesamlphp
saml2
src
SAML2
Assertion
Transformer
DecodeBase64Transformer.php
Generated on Sat Jan 18 2025 19:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)