mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -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('/');
|
||||
}
|
||||
|
||||
//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'))) {
|
||||
return redirect()->route('saml.login');
|
||||
}
|
||||
|
|
|
@ -250,8 +250,19 @@ return [
|
|||
|
||||
'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