Access Token prefix underscore in name

This commit is contained in:
2024-03-12 17:35:12 +01:00
parent b64722bd57
commit d6eacca752
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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),
+3 -3
View File
@@ -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_';
}