Interface 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.
- Aws\Common\Credentials\CredentialsInterface implements Serializable
Direct known implementers
Aws\Common\Credentials\AbstractCredentialsDecorator,
Aws\Common\Credentials\Credentials,
Aws\Common\Credentials\NullCredentials
Indirect known implementers
Aws\Common\Credentials\AbstractRefreshableCredentials,
Aws\Common\Credentials\CacheableCredentials,
Aws\Common\Credentials\RefreshableInstanceProfileCredentials
Methods summary
-
publicgetAccessKeyId ( )Returns the AWS access key ID for this credentials object.
-
publicgetSecretKey ( )Returns the AWS secret access key for this credentials object.
-
publicgetSecurityToken ( )Get the associated security token if available
-
publicgetExpiration ( )Get the UNIX timestamp in which the credentials will expire
-
publicsetAccessKeyId ( string $key )Set the AWS access key ID for this credentials object.
-
publicsetSecretKey ( string $secret )Set the AWS secret access key for this credentials object.
-
publicsetSecurityToken ( string $token )Set the security token to use with this credentials object
-
publicsetExpiration ( int $timestamp )Set the UNIX timestamp in which the credentials will expire
-
publicisExpired ( )Check if the credentials are expired
Methods detail
Returns the AWS access key ID for this credentials object.
Returns
stringReturns the AWS secret access key for this credentials object.
Returns
stringGet the associated security token if available
Returns
string|nullGet the UNIX timestamp in which the credentials will expire
Returns
integer|nullSet the AWS access key ID for this credentials object.
Parameters
- $key
string
$key AWS access key ID
Returns
Set the AWS secret access key for this credentials object.
Parameters
- $secret
string
$secret AWS secret access key
Returns
Set the security token to use with this credentials object
Parameters
- $token
string
$token Security token
Returns
Set the UNIX timestamp in which the credentials will expire
Parameters
- $timestamp
integer
$timestamp UNIX timestamp expiration
Returns
Check if the credentials are expired
Returns
boolean