Add tests for the legacy tokens, fix some tests cases [skip ci]

This commit is contained in:
ErickSkrauch
2019-09-23 01:03:36 +03:00
parent a148da2ecf
commit 2beacd0827
2 changed files with 5 additions and 5 deletions

View File

@@ -35,9 +35,9 @@ class TokensFactory {
public static function createForOAuthClient(AccessTokenEntityInterface $accessToken): Token {
$payloads = [
'aud' => self::buildAud($accessToken->getClient()->getIdentifier()),
'ely-scopes' => array_map(static function(ScopeEntityInterface $scope): string {
'ely-scopes' => implode(',', array_map(static function(ScopeEntityInterface $scope): string {
return $scope->getIdentifier();
}, $accessToken->getScopes()),
}, $accessToken->getScopes())),
'exp' => $accessToken->getExpiryDateTime()->getTimestamp(),
];
if ($accessToken->getUserIdentifier() !== null) {