InMemoryCredentialStorage implements PendingAuthorizationStorageInterface
FinalYes
Keeps credentials for the lifetime of the process.
Tags
Table of Contents
Interfaces
- PendingAuthorizationStorageInterface
- Storage must be scoped to the user session that initiated authorization.
Properties
- $pending : array<string, PendingAuthorization>
- $registrations : array<string, ClientRegistration>
- $tokens : array<string, array<string, AccessToken>>
Methods
- consumePendingAuthorization() : PendingAuthorization|null
- Atomically retrieve and remove a pending authorization, including expired entries.
- forget() : void
- Drop everything held for one authorization server, or the whole store when null.
- getClientRegistration() : ClientRegistration|null
- getToken() : AccessToken|null
- saveClientRegistration() : void
- savePendingAuthorization() : void
- saveToken() : void
- synchronize() : T
- Run an operation while no other process sharing this storage runs one.
Properties
$pending
private
array<string, PendingAuthorization>
$pending
= []
$registrations
private
array<string, ClientRegistration>
$registrations
= []
$tokens
private
array<string, array<string, AccessToken>>
$tokens
= []
Methods
consumePendingAuthorization()
Atomically retrieve and remove a pending authorization, including expired entries.
public
consumePendingAuthorization(string $state) : PendingAuthorization|null
Parameters
- $state : string
Return values
PendingAuthorization|nullforget()
Drop everything held for one authorization server, or the whole store when null.
public
forget([string|null $issuer = null ]) : void
Parameters
- $issuer : string|null = null
getClientRegistration()
public
getClientRegistration(string $issuer) : ClientRegistration|null
Parameters
- $issuer : string
-
the authorization server's issuer identifier
Return values
ClientRegistration|nullgetToken()
public
getToken(string $issuer, string $resource) : AccessToken|null
Parameters
- $issuer : string
-
the authorization server's issuer identifier
- $resource : string
-
the canonical URI of the protected resource the token may be sent to, followed by
#, the grant and, for a configured client, its client ID
Return values
AccessToken|nullsaveClientRegistration()
public
saveClientRegistration(string $issuer, ClientRegistration $registration) : void
Parameters
- $issuer : string
- $registration : ClientRegistration
savePendingAuthorization()
public
savePendingAuthorization(PendingAuthorization $authorization) : void
Parameters
- $authorization : PendingAuthorization
saveToken()
public
saveToken(string $issuer, string $resource, AccessToken $token) : void
Parameters
- $issuer : string
- $resource : string
- $token : AccessToken
synchronize()
Run an operation while no other process sharing this storage runs one.
public
synchronize(callable $operation) : T
Parameters
- $operation : callable