Credentials
in package
implements
CredentialsInterface, Serializable
Basic implementation of the AWS Credentials interface that allows callers to pass in the AWS Access Key and AWS Secret Access Key in the constructor.
Interfaces, Classes and Traits
- CredentialsInterface
- Provides access to the AWS credentials used for accessing AWS services: AWS access key ID, secret access key, and security token. These credentials are used to securely sign requests to AWS services.
- Serializable
Table of Contents
- $expires : mixed
- $key : mixed
- $secret : mixed
- $token : mixed
- __construct() : mixed
- Constructs a new BasicAWSCredentials object, with the specified AWS access key and AWS secret key
- __set_state() : mixed
- getAccessKeyId() : string
- Returns the AWS access key ID for this credentials object.
- 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
- toArray() : array<string|int, mixed>
- Converts the credentials to an associative array.
- unserialize() : mixed
Properties
$expires
private
mixed
$expires
$key
private
mixed
$key
$secret
private
mixed
$secret
$token
private
mixed
$token
Methods
__construct()
Constructs a new BasicAWSCredentials object, with the specified AWS access key and AWS secret key
public
__construct(string $key, string $secret[, string $token = null ][, int $expires = null ]) : mixed
Parameters
- $key : string
-
AWS access key ID
- $secret : string
-
AWS secret access key
- $token : string = null
-
Security token to use
- $expires : int = null
-
UNIX timestamp for when credentials expire
Return values
mixed —__set_state()
public
static __set_state(array<string|int, mixed> $state) : mixed
Parameters
- $state : array<string|int, mixed>
Return values
mixed —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 —isExpired()
Check if the credentials are expired
public
isExpired() : bool
Return values
bool —serialize()
public
serialize() : mixed
Return values
mixed —toArray()
Converts the credentials to an associative array.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —unserialize()
public
unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed