Skip to content

Commit

Permalink
Merge pull request #62 from ishannz/pulls/login-persistent-config
Browse files Browse the repository at this point in the history
New - Enable config for login persistent
  • Loading branch information
satrun77 authored Aug 28, 2024
2 parents 3f211b5 + 7f80d62 commit 6b788c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Control/SAMLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ public function acs()

/** @var IdentityStore $identityStore */
$identityStore = Injector::inst()->get(IdentityStore::class);
$identityStore->logIn($member, false, $this->getRequest());
$persistent = Config::inst()->get(SAMLConfiguration::class, 'login_persistent');
$identityStore->logIn($member, $persistent, $this->getRequest());

return $this->getRedirect();
}
Expand Down
6 changes: 6 additions & 0 deletions src/Services/SAMLConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ class SAMLConfiguration
*/
private static $additional_get_query_params = [];

/**
* @config
* @var bool Set a cookie for persistent log-ins when a user logs in.
*/
private static $login_persistent = false;

/**
* @return array
*/
Expand Down

0 comments on commit 6b788c6

Please sign in to comment.