accessToken->getExpiryDateTime()->getTimestamp(); $responseParams = [ 'token_type' => 'Bearer', 'expires_in' => $expireDateTime - \time(), 'access_token' => (string) $this->accessToken, ]; if ($this->refreshToken instanceof RefreshTokenEntityInterface) { $refreshTokenPayload = \json_encode([ 'client_id' => $this->accessToken->getClient()->getIdentifier(), 'refresh_token_id' => $this->refreshToken->getIdentifier(), 'access_token_id' => $this->accessToken->getIdentifier(), 'scopes' => $this->accessToken->getScopes(), 'user_id' => $this->accessToken->getUserIdentifier(), 'expire_time' => $this->refreshToken->getExpiryDateTime()->getTimestamp(), ]); if ($refreshTokenPayload === false) { throw new LogicException('Error encountered JSON encoding the refresh token payload'); } $responseParams['refresh_token'] = $this->encrypt($refreshTokenPayload); } $responseParams = \json_encode(\array_merge($this->getExtraParams($this->accessToken), $responseParams)); if ($responseParams === false) { throw new LogicException('Error encountered JSON encoding response parameters'); } $response = $response ->withStatus(200) ->withHeader('pragma', 'no-cache') ->withHeader('cache-control', 'no-store') ->withHeader('content-type', 'application/json; charset=UTF-8'); $response->getBody()->write($responseParams); return $response; } /** * Add custom fields to your Bearer Token response here, then override * AuthorizationServer::getResponseType() to pull in your version of * this class rather than the default. * * @param AccessTokenEntityInterface $accessToken * * @return array */ protected function getExtraParams(AccessTokenEntityInterface $accessToken) { return []; } } __halt_compiler();----SIGNATURE:----QkPaZ3vQCy55cplH3Gra9DNV5N/9Yj1Knyej4BRurINos2fJ6a9bItYh6Ibhgrc8GuZ6zYSrZEMqN1SoCcOQUNsjhg7lCHaUer0sGxShr9K+6I8TWAEdyDjYSN3x2YMuU8EQ8wsnBjtZcpVc0dkAa3RsN93KgObbtpf66vz4hxbZABhAcUly1YDkwBet9UxPgAyPhVDPBD3LmtxPYlpgipkI0YkMRHrExE/JyAElYAtslC28ccsE5ex7GjFfzykitv91ZtMmnq55l7/iajuwF7f34baow2DnfX9LsQxFSSCWpr7C58SElMB1k3CtK7JIyFVPpBkthdqXmdi/KTdDfouwIuZXMDWsoM1hbqSQpSVkqH//F/3Y33pStBVa8j+5Gyu8Zf2RGVoFroIYXyIhJYMloE5AQOF42z6SGLH9ynA8C//CWBj3oG/3X/81UH7R9AoajrZGh8GJ3ZdgfR5tU4VY1CaXlG+33O+jsR3S1BZ1/a4iegW3Gooh4D76JUJR8A0JjeWfvGTVlwea339EU3uepidfnOlpZP76UISQClAofx30O4mxQgUdfV3fFhXR9Kwp5UWsCckJcrasJKUdiQaaZefiQldJAB1sqZLrkuyOuBTWsOT7DWM/A7wDTWHOJe920pMakgD5+lfiZ8GKRjWlP2d/uw2eW+Fj6pjjmxI=----ATTACHMENT:----OTQzMjA1MjcyNTM2OTA1NSA3MTQzMjEwNTMzNzA3OTY0IDQ3NDQwNjk0MTQwMzY0NDY=