NullCredentials
in package
implements
CredentialsInterface
A blank set of credentials. AWS clients must be provided credentials, but there are some types of requests that do not need authentication. This class can be used to pivot on that scenario, and also serve as a mock credentials object when testing
Tags
Table of Contents
Interfaces
- 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.
Methods
- 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
- 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
Methods
getAccessKeyId()
Returns the AWS access key ID for this credentials object.
public
getAccessKeyId() : string
Return values
stringgetExpiration()
Get the UNIX timestamp in which the credentials will expire
public
getExpiration() : int|null
Return values
int|nullgetSecretKey()
Returns the AWS secret access key for this credentials object.
public
getSecretKey() : string
Return values
stringgetSecurityToken()
Get the associated security token if available
public
getSecurityToken() : string|null
Return values
string|nullisExpired()
Check if the credentials are expired
public
isExpired() : bool
Return values
boolserialize()
public
serialize() : mixed
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
selfsetExpiration()
Set the UNIX timestamp in which the credentials will expire
public
setExpiration(mixed $timestamp) : self
Parameters
- $timestamp : mixed
-
UNIX timestamp expiration
Return values
selfsetSecretKey()
Set the AWS secret access key for this credentials object.
public
setSecretKey(mixed $secret) : CredentialsInterface
Parameters
- $secret : mixed
-
AWS secret access key
Return values
CredentialsInterfacesetSecurityToken()
Set the security token to use with this credentials object
public
setSecurityToken(mixed $token) : self
Parameters
- $token : mixed
-
Security token
Return values
selfunserialize()
public
unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed