CredentialStorageInterface
Keeps OAuth credentials per issuer, so an authorization server never receives those of another.
Tags
Table of Contents
Methods
- forget() : void
- Drop everything held for one authorization server, or the whole store when null.
- getClientRegistration() : ClientRegistration|null
- getToken() : AccessToken|null
- saveClientRegistration() : void
- saveToken() : void
- synchronize() : T
- Run an operation while no other process sharing this storage runs one.
Methods
forget()
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
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(): T $operation) : T
Parameters
- $operation : callable(): T