Skip to content
Snippets Groups Projects
Unverified Commit b11d0cfc authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

consent: Fix for consent-statistics

As per mailinglist-discussion, consent-stats were never processed by the statistics-module due to inconsistent logging:
https://groups.google.com/forum/#!topic/simplesamlphp/Gc97OeUox2k
parent e0668c5c
No related branches found
No related tags found
No related merge requests found
...@@ -288,12 +288,12 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt ...@@ -288,12 +288,12 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt
try { try {
if ($this->_store->hasConsent($userId, $targetedId, $attributeSet)) { if ($this->_store->hasConsent($userId, $targetedId, $attributeSet)) {
// Consent already given // Consent already given
SimpleSAML\Logger::stats('Consent: Consent found'); SimpleSAML\Logger::stats('consent found');
SimpleSAML_Stats::log('consent:found', $statsData); SimpleSAML_Stats::log('consent:found', $statsData);
return; return;
} }
SimpleSAML\Logger::stats('Consent: Consent notfound'); SimpleSAML\Logger::stats('consent notfound');
SimpleSAML_Stats::log('consent:notfound', $statsData); SimpleSAML_Stats::log('consent:notfound', $statsData);
$state['consent:store'] = $this->_store; $state['consent:store'] = $this->_store;
...@@ -302,11 +302,11 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt ...@@ -302,11 +302,11 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt
$state['consent:store.attributeSet'] = $attributeSet; $state['consent:store.attributeSet'] = $attributeSet;
} catch (Exception $e) { } catch (Exception $e) {
SimpleSAML\Logger::error('Consent: Error reading from storage: '.$e->getMessage()); SimpleSAML\Logger::error('Consent: Error reading from storage: '.$e->getMessage());
SimpleSAML\Logger::stats('Consent: Failed'); SimpleSAML\Logger::stats('Ccnsent failed');
SimpleSAML_Stats::log('consent:failed', $statsData); SimpleSAML_Stats::log('consent:failed', $statsData);
} }
} else { } else {
SimpleSAML\Logger::stats('Consent: No storage'); SimpleSAML\Logger::stats('consent nostorage');
SimpleSAML_Stats::log('consent:nostorage', $statsData); SimpleSAML_Stats::log('consent:nostorage', $statsData);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment