AuthSchemeResolver
in package
implements
AuthSchemeResolverInterface
Houses logic for selecting an auth scheme modeled in a service's `auth` trait.
The auth
trait can be modeled either in a service's metadata, or at the operation level.
Table of Contents
Interfaces
- AuthSchemeResolverInterface
- An AuthSchemeResolver object determines which auth scheme will be used for request signing.
Constants
- UNSIGNED_BODY = '-unsigned-body'
Methods
- __construct() : mixed
- selectAuthScheme() : string
- Accepts a priority-ordered list of auth schemes and an Identity and selects the first compatible auth schemes, returning a normalized signature version. For example, based on the default auth scheme mapping, if `aws.auth#sigv4` is selected, `v4` will be returned.
Constants
UNSIGNED_BODY
public
mixed
UNSIGNED_BODY
= '-unsigned-body'
Methods
__construct()
public
__construct(callable $credentialProvider[, callable|null $tokenProvider = null ][, array<string|int, mixed> $authSchemeMap = [] ]) : mixed
Parameters
- $credentialProvider : callable
- $tokenProvider : callable|null = null
- $authSchemeMap : array<string|int, mixed> = []
selectAuthScheme()
Accepts a priority-ordered list of auth schemes and an Identity and selects the first compatible auth schemes, returning a normalized signature version. For example, based on the default auth scheme mapping, if `aws.auth#sigv4` is selected, `v4` will be returned.
public
selectAuthScheme(array<string|int, mixed> $authSchemes[, array<string|int, mixed> $args = [] ]) : string
Parameters
- $authSchemes : array<string|int, mixed>
- $args : array<string|int, mixed> = []