From 0164d5184839c6eeda4ecb0225a24b52af3f99f4 Mon Sep 17 00:00:00 2001 From: Jacob Christiansen <jach@wayf.dk> Date: Fri, 6 Nov 2009 10:53:06 +0000 Subject: [PATCH] Added support for disabling consent on specifik services for a given IdP. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1977 44740490-163a-0410-bde0-09ae8108e29a --- modules/consent/lib/Auth/Process/Consent.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/consent/lib/Auth/Process/Consent.php b/modules/consent/lib/Auth/Process/Consent.php index 7763565fc..ae2be3fb6 100644 --- a/modules/consent/lib/Auth/Process/Consent.php +++ b/modules/consent/lib/Auth/Process/Consent.php @@ -159,11 +159,16 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt } if ($this->store !== NULL) { + // Do not use consent if disabled on source entity + if(isset($state['Source']['consent.disable']) && in_array($state['Destination']['entityid'], $state['Source']['consent.disable'])) { + SimpleSAML_Logger::debug('Consent - Consent disabled for entity ' . $state['Destination']['entityid']); + return; + } $source = $state['Source']['metadata-set'] . '|' . $state['Source']['entityid']; $destination = $state['Destination']['metadata-set'] . '|' . $state['Destination']['entityid']; - - SimpleSAML_Logger::debug('Consent - userid : ' . $state['UserID']); + + SimpleSAML_Logger::debug('Consent - userid : ' . $state['UserID']); SimpleSAML_Logger::debug('Consent - source : ' . $source); SimpleSAML_Logger::debug('Consent - destination : ' . $destination); @@ -246,4 +251,4 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt } -?> \ No newline at end of file +?> -- GitLab