Reference documentation and code samples for the Google Auth Library Client class AwsNativeSource.
Authenticates requests using AWS credentials.
Namespace
Google \ Auth \ CredentialSourceMethods
__construct
audience
string
The audience for the credential.
regionalCredVerificationUrl
string
The regional AWS GetCallerIdentity action URL used to determine the AWS account ID and its roles. This is not called by this library, but is sent in the subject token to be called by the STS token server.
regionUrl
string|null
This URL should be used to determine the current AWS region needed for the signed request construction.
securityCredentialsUrl
string|null
The AWS metadata server URL used to retrieve the access key, secret key and security token needed to sign the GetCallerIdentity request.
imdsv2SessionTokenUrl
string|null
Presence of this URL enforces the auth libraries to fetch a Session Token from AWS. This field is required for EC2 instances using IMDSv2.
fetchSubjectToken
httpHandler
?callable
getCacheKey
Gets the unique key for caching For AwsNativeSource the values are: Imdsv2SessionTokenUrl.SecurityCredentialsUrl.RegionUrl.RegionalCredVerificationUrl
string
static::getImdsV2SessionToken
imdsV2Url
string
httpHandler
callable
static::getSignedRequestHeaders
region
string
host
string
accessKeyId
string
secretAccessKey
string
securityToken
?string
array
static::getRegionFromEnv
static::getRegionFromUrl
httpHandler
callable
regionUrl
string
headers
array
Request headers to send in with the request.
static::getRoleName
httpHandler
callable
securityCredentialsUrl
string
headers
array
Request headers to send in with the request.
static::getSigningVarsFromUrl
httpHandler
callable
securityCredentialsUrl
string
roleName
string
headers
array
Request headers to send in with the request.
array{: string, : string, : ?string}
static::getSigningVarsFromEnv
array{: string, : string, : ?string}