Fix up API handling logic for keys and set a prefix on all keys

This commit is contained in:
DaneEveritt 2022-05-22 19:03:51 -04:00
parent 8605d175d6
commit b051718afe
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 88 additions and 31 deletions

View file

@ -25,7 +25,7 @@ class ApiKeyFactory extends Factory
return [
'key_type' => ApiKey::TYPE_APPLICATION,
'identifier' => ApiKey::generateTokenIdentifier(),
'identifier' => ApiKey::generateTokenIdentifier(ApiKey::TYPE_APPLICATION),
'token' => $token ?: $token = encrypt(Str::random(ApiKey::KEY_LENGTH)),
'allowed_ips' => null,
'memo' => 'Test Function Key',