Skip to content

Commit

Permalink
Merge pull request #1 from kcoyo/Fixed-#9607---Sessions-expire-for-SA…
Browse files Browse the repository at this point in the history
…ML/RemoteUser/LDAP

Fixed #9607 - Sessions expire for SAML/RemoteUser/LDAP
  • Loading branch information
kcoyo authored May 25, 2021
2 parents 796c7c8 + cee6f0d commit 55555ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private function loginViaSaml(Request $request)
Log::debug("Attempting to log user in by SAML authentication.");
$user = $saml->samlLogin($samlData);
if(!is_null($user)) {
Auth::login($user, true);
Auth::login($user);
} else {
$username = $saml->getUsername();
\Log::warning("SAML user '$username' could not be found in database.");
Expand Down Expand Up @@ -183,7 +183,7 @@ private function loginViaRemoteUser(Request $request)
try {
$user = User::where('username', '=', $remote_user)->whereNull('deleted_at')->where('activated', '=', '1')->first();
Log::debug("Remote user auth lookup complete");
if(!is_null($user)) Auth::login($user, true);
if(!is_null($user)) Auth::login($user, $request->input('remember'));
} catch(Exception $e) {
Log::debug("There was an error authenticating the Remote user: " . $e->getMessage());
}
Expand Down Expand Up @@ -223,7 +223,7 @@ public function login(Request $request)
try {
LOG::debug("Attempting to log user in by LDAP authentication.");
$user = $this->loginViaLdap($request);
Auth::login($user, true);
Auth::login($user, $request->input('remember'));

// If the user was unable to login via LDAP, log the error and let them fall through to
// local authentication.
Expand Down

0 comments on commit 55555ee

Please sign in to comment.