ClaimFactory
class ClaimFactory
Constants
| protected MANAGED_REFRESH_CLAIMS |
Claims that belong to a single token and are rebuilt when it is refreshed. |
| protected RESERVED_CUSTOM_CLAIMS |
Identity claims derived from the user and provider. |
Properties
| static protected array | $subjectModelHashes | ||
| protected string|null | $issuer | ||
| protected bool | $lockSubject |
Methods
Build claims for a newly issued token.
Build claims for a refreshed token.
Check whether a decoded token belongs to the configured provider model.
Reject custom claims owned by the package.
Stamp standard claims, then apply caller claims on top.
Hash the subject model class.
Flush all static state.
Details
at line 35
__construct(Repository $config)
Create a new claim factory.
at line 47
array
make(Authenticatable $user, UserProvider $provider, int|null $ttl, array $customClaims = [])
Build claims for a newly issued token.
at line 76
array
refresh(array $payload, int|null $ttl, bool $refreshIssuedAt, bool $resetClaims, array $persistentClaims, array $customClaims = [])
Build claims for a refreshed token.
at line 107
mixed
subjectIdentifier(Authenticatable $user)
Determine the subject identifier for a user.
at line 117
bool
subjectMatchesProvider(array $payload, UserProvider $provider)
Check whether a decoded token belongs to the configured provider model.
at line 132
protected void
rejectReservedCustomClaims(array $claims)
Reject custom claims owned by the package.
at line 146
protected array
withDefaults(array $claims, int|null $ttl)
Stamp standard claims, then apply caller claims on top.
at line 169
protected string
subjectModelHash(string|object $model)
Hash the subject model class.
at line 179
static void
flushState()
Flush all static state.