ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
StatisticsWithAttribute.php
Go to the documentation of this file.
1
<?php
2
9
class
sspmod_core_Auth_Process_StatisticsWithAttribute
extends
SimpleSAML_Auth_ProcessingFilter
{
10
11
15
private
$attribute
= NULL;
16
17
private
$typeTag
=
'saml20-idp-SSO'
;
18
19
26
public
function
__construct
(
$config
, $reserved) {
27
parent::__construct(
$config
, $reserved);
28
29
assert(
'is_array($config)'
);
30
31
if
(array_key_exists(
'attributename'
,
$config
)) {
32
$this->attribute =
$config
[
'attributename'
];
33
if
(!is_string($this->attribute)) {
34
throw
new
Exception
(
'Invalid attribute name given to core:StatisticsWithAttribute filter.'
);
35
}
36
}
37
38
if
(array_key_exists(
'type'
,
$config
)) {
39
$this->typeTag =
$config
[
'type'
];
40
if
(!is_string($this->typeTag)) {
41
throw
new
Exception
(
'Invalid typeTag given to core:StatisticsWithAttribute filter.'
);
42
}
43
}
44
}
45
46
52
public
function
process
(&
$state
) {
53
assert(
'is_array($state)'
);
54
assert(
'array_key_exists("Attributes", $state)'
);
55
56
$logAttribute =
'NA'
;
57
$source
=
'NA'
;
58
$dest =
'NA'
;
59
60
if
(array_key_exists($this->attribute,
$state
[
'Attributes'
])) $logAttribute =
$state
[
'Attributes'
][
$this->attribute
][0];
61
if
(array_key_exists(
'Source'
,
$state
)) {
62
if
(isset(
$state
[
'Source'
][
'core:statistics-id'
])) {
63
$source
=
$state
[
'Source'
][
'core:statistics-id'
];
64
}
else
{
65
$source
=
$state
[
'Source'
][
'entityid'
];
66
}
67
}
68
69
if
(array_key_exists(
'Destination'
,
$state
)) {
70
if
(isset(
$state
[
'Destination'
][
'core:statistics-id'
])) {
71
$dest =
$state
[
'Destination'
][
'core:statistics-id'
];
72
}
else
{
73
$dest =
$state
[
'Destination'
][
'entityid'
];
74
}
75
}
76
77
if
(!array_key_exists(
'PreviousSSOTimestamp'
,
$state
)) {
78
// The user hasn't authenticated with this SP earlier in this session
79
SimpleSAML\Logger::stats
($this->typeTag .
'-first '
. $dest .
' '
.
$source
.
' '
. $logAttribute);
80
}
81
82
SimpleSAML\Logger::stats
($this->typeTag .
' '
. $dest .
' '
.
$source
.
' '
. $logAttribute);
83
}
84
85
}
$config
$config
Definition:
flush-definition-cache.php:23
$state
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition:
linkback.php:10
SimpleSAML\Logger\stats
static stats($string)
Definition:
Logger.php:224
sspmod_core_Auth_Process_StatisticsWithAttribute
Definition:
StatisticsWithAttribute.php:9
sspmod_core_Auth_Process_StatisticsWithAttribute\$typeTag
$typeTag
Definition:
StatisticsWithAttribute.php:17
sspmod_core_Auth_Process_StatisticsWithAttribute\__construct
__construct($config, $reserved)
Initialize this filter.
Definition:
StatisticsWithAttribute.php:26
$source
$source
Definition:
linkback.php:22
sspmod_core_Auth_Process_StatisticsWithAttribute\$attribute
$attribute
The attribute to log.
Definition:
StatisticsWithAttribute.php:15
SimpleSAML_Auth_ProcessingFilter
Definition:
ProcessingFilter.php:21
sspmod_core_Auth_Process_StatisticsWithAttribute\process
process(&$state)
Log line.
Definition:
StatisticsWithAttribute.php:52
Exception
libs
composer
vendor
simplesamlphp
simplesamlphp
modules
core
lib
Auth
Process
StatisticsWithAttribute.php
Generated on Sat Mar 1 2025 19:01:10 for ILIAS by
1.8.13 (using
Doxyfile
)