PassportCache
class PassportCache
Coordinate authentication lookups and invalidation across model and query writes.
Constants
| protected CONTEXT_KEY_PREFIX |
|
Methods
Create the Passport cache.
Clear an access token's memo and settle its shared invalidation.
Clear a client's memo and settle its shared invalidation.
Clear a newly created token's missing request memo.
Clear a newly created client's missing request memo.
Forget credentials without publishing transaction-local state.
Clear credentials from the current request's memo.
Get the configured shared cache repository.
Build a shared cache key for a credential.
Details
at line 29
__construct(Factory $cache, Repository $config, ModelCacheCoordinator $coordinator)
Create the Passport cache.
at line 43
Token|null
findToken(string $model, string $id)
Find an access token for authentication.
at line 60
Client|null
findClient(string $model, string|int $id, Closure $read)
Find a client for authentication.
at line 78
protected Model|null
remember(string $type, string $id, Closure $source, Closure $read)
Retrieve a model through the request memo and optional shared cache.
at line 113
void
forgetToken(string $id, Connection $connection)
Clear an access token's memo and settle its shared invalidation.
at line 121
void
forgetClient(string $id, Connection $connection)
Clear a client's memo and settle its shared invalidation.
at line 129
void
forgetTokenMemo(string $id)
Clear a newly created token's missing request memo.
at line 137
void
forgetClientMemo(string $id)
Clear a newly created client's missing request memo.
at line 147
protected void
forgetMany(string $type, array $ids, Connection $connection)
Forget credentials without publishing transaction-local state.
at line 183
protected void
forgetMemo(string $type, array $ids)
Clear credentials from the current request's memo.
at line 202
int
update(Builder $query, array $values)
Update related credentials and invalidate exactly the selected rows.
at line 213
int
delete(Builder $query)
Delete related credentials and invalidate exactly the selected rows.
at line 225
protected int
mutate(Builder $query, Closure $write)
Apply a relation mutation in bounded primary-key batches.
at line 248
protected Repository
getCache()
Get the configured shared cache repository.
at line 258
protected string
getCacheKey(string $type, string $id)
Build a shared cache key for a credential.