class CachedTokenAuthenticator implements Authenticator

Properties

protected string $cacheKey
protected string $store
protected OAuthAuthenticator $resolver
protected CachedToken|null $token

Methods

__construct(string $key, callable $resolver, string|null $store = null)

Create an authenticator for an independently reacquirable grant.

void
set(PendingRequest $pendingRequest)

Apply a cached token, acquiring one when needed.

void
forget()

Forget this instance's token and the shared cache entry.

cache()

Resolve the selected token cache.

Details

at line 36
__construct(string $key, callable $resolver, string|null $store = null)

Create an authenticator for an independently reacquirable grant.

Parameters

string $key
callable $resolver
string|null $store

at line 48
void set(PendingRequest $pendingRequest)

Apply a cached token, acquiring one when needed.

Parameters

PendingRequest $pendingRequest

Return Value

void

at line 84
void forget()

Forget this instance's token and the shared cache entry.

Return Value

void

at line 93
protected Repository cache()

Resolve the selected token cache.

Return Value

Repository