Class Credentials
- Aws\Credentials\Credentials implements Aws\Credentials\CredentialsInterface, Serializable
- Namespace: Aws\Credentials
- Located at Credentials/Credentials.php
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.
Direct known subclasses
Methods Summary
-
__construct ( string $key, string $secret, string $token = null, int $expires = null )
Constructs a new BasicAWSCredentials object, with the specified AWS access key and AWS secret key
- static __set_state ( array $state )
-
getAccessKeyId ( )
Returns the AWS access key ID for this credentials object.
-
getSecretKey ( )
Returns the AWS secret access key for this credentials object.
-
getSecurityToken ( )
Get the associated security token if available
-
getExpiration ( )
Get the UNIX timestamp in which the credentials will expire
-
isExpired ( )
Check if the credentials are expired
-
toArray ( )
Converts the credentials to an associative array.
- serialize ( )
- unserialize ( $serialized )
- __serialize ( )
- __unserialize ( $data )
Methods Details
__construct ( string $key, string $secret, string $token = null, integer $expires = null )
Constructs a new BasicAWSCredentials object, with the specified AWS access key and AWS secret key
Parameters
string | $key | AWS access key ID |
string | $secret | AWS secret access key |
string | $token = null | Security token to use |
integer | $expires = null | UNIX timestamp for when credentials expire |
static __set_state ( array $state )
string getAccessKeyId ( )
Returns the AWS access key ID for this credentials object.
Returns
string |
Implementation of
string getSecretKey ( )
Returns the AWS secret access key for this credentials object.
Returns
string |
Implementation of
string|null getSecurityToken ( )
Get the associated security token if available
Returns
string|null |
Implementation of
integer|null getExpiration ( )
Get the UNIX timestamp in which the credentials will expire
Returns
integer|null |
Implementation of
boolean isExpired ( )
Check if the credentials are expired
Returns
boolean |
Implementation of
array toArray ( )
Converts the credentials to an associative array.
Returns
array |
Implementation of
serialize ( )
Implementation of
Serializable::serialize()
unserialize ( $serialized )
Implementation of
Serializable::unserialize()