SDK for PHP V3

LoginCredentialProvider
in package

FinalYes

Credential provider for login using console credentials

Table of Contents

Methods

__construct()  : mixed
__invoke()  : PromiseInterface
Returns a promise that resolves to AWS credentials

Methods

__construct()

public __construct(string $profileName[, string|null $region = null ]) : mixed
Parameters
$profileName : string

Profile containing your console login session information

$region : string|null = null

Region used for refresh requests. If not provided, attempts will be made to resolve a region using AWS_REGION, then the profile specified for login.

__invoke()

Returns a promise that resolves to AWS credentials

public __invoke() : PromiseInterface

This method loads the cached token, refreshes it if necessary, and returns AWS credentials sourced from the access token.

Tags
throws
CredentialsException

If re-authentication is required or credentials cannot be loaded

throws
SigninException

If the token refresh fails with a SigninException

Return values
PromiseInterface

A promise that resolves to a Credentials object

<-- modeled_exceptions -->
On this page