mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Add option to environment to require SAML for a more secure installation.
This commit is contained in:
parent
52322806fa
commit
3c8d70c5fb
|
@ -74,6 +74,12 @@ class LoginController extends Controller
|
||||||
return redirect()->intended('/');
|
return redirect()->intended('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If the environment is set to ALWAYS require SAML, go straight to the SAML route.
|
||||||
|
if((env("REQUIRE_SAML", false)))
|
||||||
|
{
|
||||||
|
return redirect()->route('saml.login');
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->saml->isEnabled() && Setting::getSettings()->saml_forcelogin == '1' && ! ($request->has('nosaml') || $request->session()->has('error'))) {
|
if ($this->saml->isEnabled() && Setting::getSettings()->saml_forcelogin == '1' && ! ($request->has('nosaml') || $request->session()->has('error'))) {
|
||||||
return redirect()->route('saml.login');
|
return redirect()->route('saml.login');
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,18 @@ return [
|
||||||
|
|
||||||
'enable_csp' => env('ENABLE_CSP', false),
|
'enable_csp' => env('ENABLE_CSP', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Require SAML Login
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Disable the ability to login via form login, and require all logins to
|
||||||
|
| process via SAML login. (If you are not using SAML, this option should
|
||||||
|
| be left alone.)
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'require_saml' => env('REQUIRE_SAML', false),
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue