Fixed expires_in

This commit is contained in:
Alex Bilbie 2016-04-10 14:30:44 +01:00
parent 273ea0ba68
commit e24dff2723

View File

@ -162,7 +162,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant
$redirectPayload['access_token'] = (string) $accessToken->convertToJWT($this->privateKey); $redirectPayload['access_token'] = (string) $accessToken->convertToJWT($this->privateKey);
$redirectPayload['token_type'] = 'bearer'; $redirectPayload['token_type'] = 'bearer';
$redirectPayload['expires_in'] = time() - $accessToken->getExpiryDateTime()->getTimestamp(); $redirectPayload['expires_in'] = $accessToken->getExpiryDateTime()->getTimestamp() - (new \DateTime())->getTimestamp();
$response = new RedirectResponse(); $response = new RedirectResponse();
$response->setRedirectUri( $response->setRedirectUri(