AWSBasicSessionCredentialsProvider Class Reference

Inherits from NSObject
Conforms to AWSCredentialsProvider
Declared in AWSCredentialsProvider.h
AWSCredentialsProvider.m

Overview

Warning: This credentials provider is intended only for testing purposes. We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using AWSCognitoCredentialsProvider. Simple session credentials with keys and session token.

Other Methods

– initWithAccessKey:secretKey:sessionToken:

Instantiates a static credentials provider.

- (instancetype)initWithAccessKey:(NSString *)accessKey secretKey:(NSString *)secretKey sessionToken:(NSString *)sessionToken

Parameters

accessKey

An AWS Access key.

secretKey

An AWS Secret key.

sessionToken

The session token for this session.

Return Value

An AWS credentials object.

Declared In

AWSCredentialsProvider.h

Other Methods

– credentials

Asynchronously returns a valid AWS credentials or an error object if it cannot retrieve valid credentials. It should cache valid credentials as much as possible and refresh them when they are invalid.

- (AWSTask<AWSCredentials*> *)credentials

Return Value

A valid AWS credentials or an error object describing the error.

Declared In

AWSCredentialsProvider.h

– invalidateCachedTemporaryCredentials

Invalidates the cached temporary AWS credentials. If the credentials provider does not cache temporary credentials, this operation is a no-op.

- (void)invalidateCachedTemporaryCredentials

Declared In

AWSCredentialsProvider.h