diff --git a/src/Service/Auth/AuthService.php b/src/Service/Auth/AuthService.php index 14e1e37..fd7da70 100644 --- a/src/Service/Auth/AuthService.php +++ b/src/Service/Auth/AuthService.php @@ -29,7 +29,7 @@ class AuthService $token = new UserToken; $token->setOwnedBy($user); - $token->setToken(sprintf('%s_%s', $type->value, hash( + $token->setToken(sprintf('%s%s', $type->value, hash( self::TOKEN_HASH_ALGO, join('', [ microtime(true), diff --git a/src/Service/Auth/AuthTokenType.php b/src/Service/Auth/AuthTokenType.php index 066f25d..6d30e1d 100644 --- a/src/Service/Auth/AuthTokenType.php +++ b/src/Service/Auth/AuthTokenType.php @@ -6,13 +6,13 @@ enum AuthTokenType: string { /** * An OAuth type represents an Authentication Token created via an OAuth flow. - * OAuth Tokens represent 3rd party apps acting on behalf of a User. + * OAuth Access Tokens represent 3rd party apps acting on behalf of a User. */ - case OAuth = 'oat'; + case OAuth = 'oat_'; /** * A Personal type represents an Authentication Token created via direct login. * Personal Access Tokens represent the User itself. */ - case Personal = 'pat'; + case Personal = 'pat_'; }