From 0efa7cd7eab83c39b722d150b9d90d55c78b9443 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 13 Jan 2016 00:13:16 +0000 Subject: [PATCH] Set the uid on the refresh token --- src/ResponseTypes/BearerTokenResponse.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();