diff --git a/src/ResponseTypes/BearerTokenResponse.php b/src/ResponseTypes/BearerTokenResponse.php index 4bded1a7..cd23b8dd 100644 --- a/src/ResponseTypes/BearerTokenResponse.php +++ b/src/ResponseTypes/BearerTokenResponse.php @@ -47,8 +47,9 @@ class BearerTokenResponse extends AbstractResponseType ->setIssuedAt(time()) ->setNotBefore(time()) ->setExpiration($this->refreshToken->getExpiryDateTime()->getTimestamp()) - ->set('accessToken', $this->accessToken->getIdentifier()) + ->set('uid', $this->accessToken->getUserIdentifier()) ->set('scopes', $this->accessToken->getScopes()) + ->set('accessToken', $this->accessToken->getIdentifier()) ->sign(new Sha256(), new Key($this->pathToPrivateKey)) ->getToken();