mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Reduce SAML debugging output to actual error conditions
This commit is contained in:
parent
137b558bef
commit
4e65a8d755
|
@ -130,11 +130,12 @@ class Saml
|
|||
$this->clearData();
|
||||
}
|
||||
|
||||
\Log::debug('Trying to create a new OneLogin_Saml2_Auth object ');
|
||||
try {
|
||||
$this->_auth = new OneLogin_Saml2_Auth($this->_settings);
|
||||
} catch (Exception $e) {
|
||||
\Log::error('Trying OneLogin_Saml2_Auth failed. Setting SAML enabled to false. OneLogin_Saml2_Auth error message is: '. $e->getMessage());
|
||||
if ( $this->isEnabled() ) { // $this->loadSettings() initializes this to true if SAML is enabled by settings.
|
||||
\Log::error('Trying OneLogin_Saml2_Auth failed. Setting SAML enabled to false. OneLogin_Saml2_Auth error message is: '. $e->getMessage());
|
||||
}
|
||||
$this->_enabled = false;
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +158,6 @@ class Saml
|
|||
$this->_enabled = $setting->saml_enabled == '1';
|
||||
|
||||
if ($this->isEnabled()) {
|
||||
\Log::debug('SAML is enabled according to loadSettings()');
|
||||
//Let onelogin/php-saml know to use 'X-Forwarded-*' headers if it is from a trusted proxy
|
||||
OneLogin_Saml2_Utils::setProxyVars(request()->isFromTrustedProxy());
|
||||
|
||||
|
|
Loading…
Reference in a new issue