Documentation

CacheableCredentials extends AbstractRefreshableCredentials
in package

Credentials decorator used to implement caching credentials

Table of Contents

Properties

$cache  : CacheAdapterInterface
$cacheKey  : string
$credentials  : CredentialsInterface

Methods

__construct()  : mixed
CacheableCredentials is a decorator that decorates other credentials
getAccessKeyId()  : string
Returns the AWS access key ID for this credentials object.
getCredentials()  : Credentials
Get the underlying credentials, refreshing if necessary.
getExpiration()  : int|null
Get the UNIX timestamp in which the credentials will expire
getSecretKey()  : string
Returns the AWS secret access key for this credentials object.
getSecurityToken()  : string|null
Get the associated security token if available
isExpired()  : bool
Check if the credentials are expired
serialize()  : mixed
{@inheritdoc}
setAccessKeyId()  : self
Set the AWS access key ID for this credentials object.
setExpiration()  : self
Set the UNIX timestamp in which the credentials will expire
setSecretKey()  : CredentialsInterface
Set the AWS secret access key for this credentials object.
setSecurityToken()  : self
Set the security token to use with this credentials object
unserialize()  : mixed
{@inheritdoc}
refresh()  : mixed
Attempt to get new credentials from cache or from the adapted object

Properties

Methods

__construct()

CacheableCredentials is a decorator that decorates other credentials

public __construct(CredentialsInterface $credentials, CacheAdapterInterface $cache, string $cacheKey) : mixed
Parameters
$credentials : CredentialsInterface

Credentials to adapt

$cache : CacheAdapterInterface

Cache to use to store credentials

$cacheKey : string

Cache key of the credentials

getAccessKeyId()

Returns the AWS access key ID for this credentials object.

public getAccessKeyId() : string
Return values
string

getExpiration()

Get the UNIX timestamp in which the credentials will expire

public getExpiration() : int|null
Return values
int|null

getSecretKey()

Returns the AWS secret access key for this credentials object.

public getSecretKey() : string
Return values
string

getSecurityToken()

Get the associated security token if available

public getSecurityToken() : string|null
Return values
string|null

setAccessKeyId()

Set the AWS access key ID for this credentials object.

public setAccessKeyId(mixed $key) : self
Parameters
$key : mixed

AWS access key ID

Return values
self

setExpiration()

Set the UNIX timestamp in which the credentials will expire

public setExpiration(mixed $timestamp) : self
Parameters
$timestamp : mixed

UNIX timestamp expiration

Return values
self

setSecurityToken()

Set the security token to use with this credentials object

public setSecurityToken(mixed $token) : self
Parameters
$token : mixed

Security token

Return values
self

refresh()

Attempt to get new credentials from cache or from the adapted object

protected refresh() : mixed

        
On this page

Search results