Skip to content
Snippets Groups Projects
Unverified Commit e51d0017 authored by Pavel Vyskočil's avatar Pavel Vyskočil Committed by GitHub
Browse files

Merge pull request #12 from pajavyskocil/logging

Every successfully log in is logged with notice level
parents 6d4254c1 71e909fe
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
[Added]
- Every successfully log in is logged with notice level
## [v2.0.0] ## [v2.0.0]
[Added] [Added]
......
...@@ -25,6 +25,21 @@ class sspmod_proxystatistics_Auth_Process_statistics extends SimpleSAML_Auth_Pro ...@@ -25,6 +25,21 @@ class sspmod_proxystatistics_Auth_Process_statistics extends SimpleSAML_Auth_Pro
{ {
$dateTime = new DateTime(); $dateTime = new DateTime();
DatabaseCommand::insertLogin($request, $dateTime); DatabaseCommand::insertLogin($request, $dateTime);
$eduPersonUniqueId = $request['Attributes']['eduPersonUniqueId'][0];
$spEntityId = $request['SPMetadata']['entityid'];
$sourceIdPEppn = $request['Attributes']['sourceIdPEppn'][0];
$sourceIdPEntityId = $request['Attributes']['sourceIdPEntityID'][0];
if (isset($request['perun']['user'])) {
$user = $request['perun']['user'];
SimpleSAML\Logger::notice('UserId: ' . $user->getId() . ', identity: ' . $eduPersonUniqueId . ', service: ' . $spEntityId .
', external identity: ' . $sourceIdPEppn . ' from ' . $sourceIdPEntityId);
} else {
SimpleSAML\Logger::notice('User identity: ' . $eduPersonUniqueId . ', service: ' . $spEntityId .
', external identity: ' . $sourceIdPEppn . ' from ' . $sourceIdPEntityId);
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment