mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-02 09:14:50 +02:00
Also update timestamp for environment variable auth
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
bae5f79cbd
commit
a1986b46b0
|
@ -141,6 +141,11 @@ class SAMLController extends Controller {
|
|||
$this->session->set('user_saml.samlUserData', $_SERVER);
|
||||
try {
|
||||
$this->autoprovisionIfPossible($this->session->get('user_saml.samlUserData'));
|
||||
$user = $this->userManager->get($this->userBackend->getCurrentUserId());
|
||||
if(!($user instanceof IUser)) {
|
||||
throw new NoUserFoundException();
|
||||
}
|
||||
$user->updateLastLoginTimestamp();
|
||||
} catch (NoUserFoundException $e) {
|
||||
$ssoUrl = $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned');
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ Feature: EnvironmentVariable
|
|||
When I send a GET request to "http://localhost/index.php/login"
|
||||
Then I should be redirected to "http://localhost/index.php/apps/files/"
|
||||
Then The user value "id" should be "not-provisioned-user"
|
||||
And The last login timestamp of "not-provisioned-user" should not be empty
|
||||
|
||||
Scenario: Authenticating using environment variable with SSO and successful check if user exists on backend
|
||||
Given A local user with uid "provisioned-user" exists
|
||||
|
@ -17,6 +18,7 @@ Feature: EnvironmentVariable
|
|||
When I send a GET request to "http://localhost/index.php/login"
|
||||
Then I should be redirected to "http://localhost/index.php/apps/files/"
|
||||
Then The user value "id" should be "provisioned-user"
|
||||
And The last login timestamp of "provisioned-user" should not be empty
|
||||
|
||||
Scenario: Authenticating using environment variable with SSO and unsuccessful check if user exists on backend
|
||||
Given The setting "type" is set to "environment-variable"
|
||||
|
|
Loading…
Reference in a new issue