This repository was archived by the owner on Sep 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 2
2
All notable changes to this project will be documented in this file.
3
3
4
4
## [ Unreleased]
5
+ [ Added]
6
+ - Every successfully log in is logged with notice level
5
7
6
8
## [ v2.0.0]
7
9
[ Added]
Original file line number Diff line number Diff line change @@ -25,6 +25,21 @@ public function process(&$request)
25
25
{
26
26
$ dateTime = new DateTime ();
27
27
DatabaseCommand::insertLogin ($ request , $ dateTime );
28
+
29
+ $ eduPersonUniqueId = $ request ['Attributes ' ]['eduPersonUniqueId ' ][0 ];
30
+ $ spEntityId = $ request ['SPMetadata ' ]['entityid ' ];
31
+ $ sourceIdPEppn = $ request ['Attributes ' ]['sourceIdPEppn ' ][0 ];
32
+ $ sourceIdPEntityId = $ request ['Attributes ' ]['sourceIdPEntityID ' ][0 ];
33
+
34
+ if (isset ($ request ['perun ' ]['user ' ])) {
35
+ $ user = $ request ['perun ' ]['user ' ];
36
+ SimpleSAML \Logger::notice ('UserId: ' . $ user ->getId () . ', identity: ' . $ eduPersonUniqueId . ', service: ' . $ spEntityId .
37
+ ', external identity: ' . $ sourceIdPEppn . ' from ' . $ sourceIdPEntityId );
38
+ } else {
39
+ SimpleSAML \Logger::notice ('User identity: ' . $ eduPersonUniqueId . ', service: ' . $ spEntityId .
40
+ ', external identity: ' . $ sourceIdPEppn . ' from ' . $ sourceIdPEntityId );
41
+ }
42
+
28
43
}
29
44
30
45
}
You can’t perform that action at this time.
0 commit comments