We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f32e31 commit f15033cCopy full SHA for f15033c
1 file changed
app/traits/HasTokenManagement.php
@@ -4,7 +4,7 @@ trait HasTokenManagement
4
{
5
use HasEncryption;
6
7
- private const VALID_TOKEN_TYPES = ['public', 'admin', 'user'];
+ private array $validTokenTypes = ['public', 'admin', 'user'];
8
9
/**
10
* Sanitizes an API token to ensure it matches the expected format.
@@ -89,7 +89,7 @@ public function clearTokens(): void
89
*/
90
protected function validateTokenType(string $type): string
91
92
- return in_array($type, self::VALID_TOKEN_TYPES, true) ? $type : 'public';
+ return in_array($type, $this->validTokenTypes, true) ? $type : 'public';
93
}
94
95
0 commit comments