AwsCredentialCache
class AwsCredentialCache
Constants
| protected REFRESH_WINDOW |
The number of seconds before expiration that credentials should be refreshed. |
| protected LOCK_SECONDS |
The number of seconds the credential refresh lock should be maintained. |
| protected LOCK_WAIT_SECONDS |
The number of seconds to wait for another process to refresh credentials. |
Properties
| protected Repository | $repository | The resolver for the backing cache repository. |
|
| protected null|Repository | $fallback | The resolver for the fallback cache repository, if any. |
Methods
Resolve credentials while sharing a single refresh across processes.
Get fresh credentials from the available cache repositories.
Resolve and cache credentials before releasing the refresh lock.
Store the credentials, silently ignoring unavailable cache stores.
Remove the cached credentials, silently ignoring unavailable cache stores.
Get the cache repository resolvers in order of preference.
Release the credential refresh lock while preserving the primary failure.
Details
at line 55
__construct(Closure $repository, Closure|null $fallback = null)
Create a new AWS credential cache.
at line 64
PromiseInterface
resolve(string $key, callable $provider)
Resolve credentials while sharing a single refresh across processes.
at line 113
protected CredentialsInterface|null
freshCredentials(string $key)
Get fresh credentials from the available cache repositories.
at line 137
protected PromiseInterface
resolveAndCache(string $key, callable $provider, Lock|null $lock = null)
Resolve and cache credentials before releasing the refresh lock.
at line 182
protected void
put(string $key, CredentialsInterface $credentials, int $ttl)
Store the credentials, silently ignoring unavailable cache stores.
at line 198
protected void
forget(string $key)
Remove the cached credentials, silently ignoring unavailable cache stores.
at line 216
protected array
repositories()
Get the cache repository resolvers in order of preference.
at line 224
protected void
release(Lock|null $lock)
Release the credential refresh lock without affecting credential resolution.