diff --git a/src/AuthManager.php b/src/AuthManager.php index c6c1e3a..274fa49 100644 --- a/src/AuthManager.php +++ b/src/AuthManager.php @@ -107,7 +107,7 @@ public function login(string $accountTypeName, array $data): AuthSession if ($this->cacheEnable === true) { try { $this->getCacheClient() - ->set($this->getCacheKey($session->getIdentity(), $session->getExtendedData()), $session->getToken(), $session->getExpirationTime()); + ->set($this->getCacheKey($session->getIdentity(), $session->getExtendedData()), $session->getToken(), $this->getSessionDuration()); } catch (InvalidArgumentException $e) { $err = sprintf('%s Invalid Argument : %s', $session->getIdentity(), $e->getMessage()); throw new AuthException(ErrorCode::POST_DATA_NOT_PROVIDED, $err); @@ -135,7 +135,6 @@ public function generateSession(string $accountTypeName, string $identity, array ->setCreateTime($startTime) ->setIdentity($identity) ->setAccountTypeName($accountTypeName); - $session->setExtendedData($data); $token = $this->getTokenParser()->getToken($session); $session->setToken($token); return $session;