Skip to content

MissingAuthenticationToken is thrown by StsClient::getCallerIdentity() #3246

Description

@shadowhand

Describe the bug

The method StsClient::getCallerIdentity() MAY throw MissingAuthenticationToken.

This can happen when the current configuration is targeting SSO without any active session. The only place the MissingAuthenticationToken is documented is in ComputeOptimizer, which seems incorrect given that tokens are related to authentication.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

StsClient::getCallerIdentity() documents that MissingAuthenticationToken MAY be thrown.

Current Behavior

StsClient::getCallerIdentity() has no documentation of possible errors.

Reproduction Steps

Configure a profile with SSO authentication.
Ensure no active credentials with aws sso logout.
Execute a request to STS::getCallerIdentity().

Possible Solution

Add errors to the GetCallerIdentity API manifest.

Additional Information/Context

It appears that GetCallerIdentity is missing possible errors. The API documentation also does not list this error, but links to Common Errors, which also does not list this error, so this may be an upstream issue.

SDK version used

latest

Environment details (Version of PHP (php -v)? OS name and version, etc.)

not relevant

Metadata

Metadata

Labels

closing-soonThis issue will automatically close in 4 days unless further comments are made.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions