diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/AuthenticatedSessionStateHandler.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/AuthenticatedSessionStateHandler.php index 3fc9e5aa2..6cd526dec 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/AuthenticatedSessionStateHandler.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/AuthenticatedSessionStateHandler.php @@ -26,58 +26,49 @@ interface AuthenticatedSessionStateHandler /** * Sets the moment at which the user was authenticated * - * @return void * @throws LogicException when an authentication moment was already logged */ - public function logAuthenticationMoment(); + public function logAuthenticationMoment(): void; - /** - * @return bool - */ - public function isAuthenticationMomentLogged(); + public function isAuthenticationMomentLogged(): bool; /** * Gets the moment at which the user was authenticated * - * @return DateTime * @throws LogicException when no authentication moment was logged */ - public function getAuthenticationMoment(); + public function getAuthenticationMoment(): DateTime; /** * Updates the last interaction moment to the current moment - * - * @return void */ - public function updateLastInteractionMoment(); + public function updateLastInteractionMoment(): void; /** * Retrieves the last interaction moment - * - * @return DateTime */ - public function getLastInteractionMoment(); + public function getLastInteractionMoment(): DateTime; /** * @return bool */ - public function hasSeenInteraction(); + public function hasSeenInteraction(): bool; /** * @param string $uri */ - public function setCurrentRequestUri($uri); + public function setCurrentRequestUri(string $uri): void; /** * @return string */ - public function getCurrentRequestUri(); + public function getCurrentRequestUri(): string; /** * Migrates the current session to a new session id while maintaining all * session attributes. */ - public function migrate(); + public function migrate(): void; /** * Invalidates the session @@ -85,5 +76,5 @@ public function migrate(); * Clears all session attributes and flashes and regenerates the * session and deletes the old session from persistence */ - public function invalidate(); + public function invalidate(): void; } diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Session/SessionStorage.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Session/SessionStorage.php index 7ac351015..470a7872c 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Session/SessionStorage.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Session/SessionStorage.php @@ -81,12 +81,12 @@ public function getLastInteractionMoment(): DateTime return DateTime::fromString($this->requestStack->getSession()->get(self::AUTH_SESSION_KEY . 'last_interaction')); } - public function setCurrentRequestUri($uri): void + public function setCurrentRequestUri(string $uri): void { $this->requestStack->getSession()->set(self::AUTH_SESSION_KEY . 'current_uri', $uri); } - public function getCurrentRequestUri() + public function getCurrentRequestUri(): string { $uri = $this->requestStack->getSession()->get(self::AUTH_SESSION_KEY . 'current_uri'); $this->requestStack->getSession()->remove(self::AUTH_SESSION_KEY . 'current_uri');