Change function name to be less technically specific

This commit is contained in:
Andrew Millington
2018-03-31 10:45:15 +01:00
committed by Lukáš Unger
parent fd72d79ad3
commit 48ce5f36cf
5 changed files with 6 additions and 6 deletions

View File

@@ -30,5 +30,5 @@ interface AccessTokenEntityInterface extends TokenInterface
*
* @return string
*/
public function getResponseString(CryptKey $privateKey);
public function convertToAccessToken(CryptKey $privateKey);
}

View File

@@ -47,7 +47,7 @@ trait AccessTokenTrait
*
* @return string
*/
public function getResponseString(CryptKey $privateKey)
public function convertToAccessToken(CryptKey $privateKey)
{
return (string) $this->convertToJWT($privateKey);
}

View File

@@ -216,7 +216,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant
$this->makeRedirectUri(
$finalRedirectUri,
[
'access_token' => $accessToken->getResponseString($this->privateKey),
'access_token' => $accessToken->convertToAccessToken($this->privateKey),
'token_type' => 'Bearer',
'expires_in' => $accessToken->getExpiryDateTime()->getTimestamp() - (new \DateTime())->getTimestamp(),
'state' => $authorizationRequest->getState(),

View File

@@ -27,7 +27,7 @@ class BearerTokenResponse extends AbstractResponseType
$responseParams = [
'token_type' => 'Bearer',
'expires_in' => $expireDateTime - (new \DateTime())->getTimestamp(),
'access_token' => $this->accessToken->getResponseString($this->privateKey),
'access_token' => $this->accessToken->convertToAccessToken($this->privateKey),
];
if ($this->refreshToken instanceof RefreshTokenEntityInterface) {