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 22All notable changes to this project will be documented in this file.
33
44## [ Unreleased]
5+ [ Added]
6+ - Every successfully log in is logged with notice level
57
68## [ v2.0.0]
79[ Added]
Original file line number Diff line number Diff line change @@ -25,6 +25,21 @@ public function process(&$request)
2525 {
2626 $ dateTime = new DateTime ();
2727 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+
2843 }
2944
3045}
You can’t perform that action at this time.
0 commit comments