mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 17:56:14 +05:30
Uset sub instead of uid
This commit is contained in:
parent
70e9d7b699
commit
c1d15aa15c
@ -30,7 +30,7 @@ class BearerTokenResponse extends AbstractResponseType
|
|||||||
->setIssuedAt(time())
|
->setIssuedAt(time())
|
||||||
->setNotBefore(time())
|
->setNotBefore(time())
|
||||||
->setExpiration($this->accessToken->getExpiryDateTime()->getTimestamp())
|
->setExpiration($this->accessToken->getExpiryDateTime()->getTimestamp())
|
||||||
->set('uid', $this->accessToken->getUserIdentifier())
|
->setSubject($this->accessToken->getUserIdentifier())
|
||||||
->set('scopes', $this->accessToken->getScopes())
|
->set('scopes', $this->accessToken->getScopes())
|
||||||
->sign(new Sha256(), new Key($this->pathToPrivateKey))
|
->sign(new Sha256(), new Key($this->pathToPrivateKey))
|
||||||
->getToken();
|
->getToken();
|
||||||
@ -47,7 +47,8 @@ class BearerTokenResponse extends AbstractResponseType
|
|||||||
->setIssuedAt(time())
|
->setIssuedAt(time())
|
||||||
->setNotBefore(time())
|
->setNotBefore(time())
|
||||||
->setExpiration($this->refreshToken->getExpiryDateTime()->getTimestamp())
|
->setExpiration($this->refreshToken->getExpiryDateTime()->getTimestamp())
|
||||||
->set('uid', $this->accessToken->getUserIdentifier())
|
->set('type', 'refreshToken')
|
||||||
|
->setSubject($this->accessToken->getUserIdentifier())
|
||||||
->set('scopes', $this->accessToken->getScopes())
|
->set('scopes', $this->accessToken->getScopes())
|
||||||
->set('accessToken', $this->accessToken->getIdentifier())
|
->set('accessToken', $this->accessToken->getIdentifier())
|
||||||
->sign(new Sha256(), new Key($this->pathToPrivateKey))
|
->sign(new Sha256(), new Key($this->pathToPrivateKey))
|
||||||
|
Loading…
Reference in New Issue
Block a user