mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-26 06:59:49 +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())
|
||||
->setNotBefore(time())
|
||||
->setExpiration($this->accessToken->getExpiryDateTime()->getTimestamp())
|
||||
->set('uid', $this->accessToken->getUserIdentifier())
|
||||
->setSubject($this->accessToken->getUserIdentifier())
|
||||
->set('scopes', $this->accessToken->getScopes())
|
||||
->sign(new Sha256(), new Key($this->pathToPrivateKey))
|
||||
->getToken();
|
||||
@ -47,7 +47,8 @@ class BearerTokenResponse extends AbstractResponseType
|
||||
->setIssuedAt(time())
|
||||
->setNotBefore(time())
|
||||
->setExpiration($this->refreshToken->getExpiryDateTime()->getTimestamp())
|
||||
->set('uid', $this->accessToken->getUserIdentifier())
|
||||
->set('type', 'refreshToken')
|
||||
->setSubject($this->accessToken->getUserIdentifier())
|
||||
->set('scopes', $this->accessToken->getScopes())
|
||||
->set('accessToken', $this->accessToken->getIdentifier())
|
||||
->sign(new Sha256(), new Key($this->pathToPrivateKey))
|
||||
|
Loading…
Reference in New Issue
Block a user