AWSCognitoAuthConfiguration Class Reference

Inherits from NSObject
Declared in AWSCognitoAuth.h
AWSCognitoAuth.m

Overview

Houses all configuration for AWSCognitoAuth

  appClientId

The app client id

@property (nonatomic, readonly) NSString *appClientId

Declared In

AWSCognitoAuth.h

  appClientSecret

The optional app client secret

@property (nonatomic, readonly, nullable) NSString *appClientSecret

Declared In

AWSCognitoAuth.h

  scopes

The scopes

@property (nonatomic, readonly) NSSet<NSString*> *scopes

Declared In

AWSCognitoAuth.h

  signInRedirectUri

uri to redirect on sign in. Must be configured as a uri scheme in your info.plist

@property (nonatomic, readonly) NSString *signInRedirectUri

Declared In

AWSCognitoAuth.h

  signOutRedirectUri

uri to redirect on sign out. Must be configured as a uri scheme in your info.plist

@property (nonatomic, readonly) NSString *signOutRedirectUri

Declared In

AWSCognitoAuth.h

  webDomain

The FQDN of your Cognito endpoint, something like https://mydomain.region.auth.amazoncognito.com

@property (nonatomic, readonly) NSString *webDomain

Declared In

AWSCognitoAuth.h

  identityProvider

The optional provider name to authenticate with directly instead of presenting the end user with a list of configured providers

@property (nonatomic, readonly, nullable) NSString *identityProvider

Declared In

AWSCognitoAuth.h

  idpIdentifier

The optional provider identifier to authenticate with directly instead of presenting the end user with a list of configured providers. Use this if you want to hide the provider name from the end user.

@property (nonatomic, readonly, nullable) NSString *idpIdentifier

Declared In

AWSCognitoAuth.h

  userPoolId

The optional user pool id, required if you have enabled advanced security features on your pool.

@property (nonatomic, readonly, nullable) NSString *userPoolId

Declared In

AWSCognitoAuth.h

  asfEnabled

Whether user context information to drive the advanced security feature is emitted.

@property (nonatomic, assign, readonly, getter=isASFEnabled) BOOL asfEnabled

Declared In

AWSCognitoAuth.h

  isSFAuthenticationSessionEnabled

If using iOS 11 or above, the SDK will use SFAuthenticationSession for signIn and signOut operations if this flag is set. Below iOS 11, the SDK will use SFSafariViewController regardless of this setting.

@property (nonatomic, assign, readonly) BOOL isSFAuthenticationSessionEnabled

Declared In

AWSCognitoAuth.h

– initWithAppClientId:appClientSecret:scopes:signInRedirectUri:signOutRedirectUri:webDomain:

Configuration object for CognitoAuth

- (instancetype)initWithAppClientId:(NSString *)appClientId appClientSecret:(nullable NSString *)appClientSecret scopes:(NSSet<NSString*> *)scopes signInRedirectUri:(NSString *)signInRedirectUri signOutRedirectUri:(NSString *)signOutRedirectUri webDomain:(NSString *)webDomain

Parameters

appClientId

The app client id

appClientSecret

The optional app client secret

scopes

Set of scopes to obtain

signInRedirectUri

uri to redirect on sign in. Must be configured as a uri scheme in your info.plist

signOutRedirectUri

uri to redirect on sign out. Must be configured as a uri scheme in your info.plist

webDomain

The FQDN of your Cognito endpoint, something like https://mydomain.region.auth.amazoncognito.com

Declared In

AWSCognitoAuth.h

– initWithAppClientId:appClientSecret:scopes:signInRedirectUri:signOutRedirectUri:webDomain:identityProvider:idpIdentifier:userPoolIdForEnablingASF:

Configuration object for CognitoAuth

- (instancetype)initWithAppClientId:(NSString *)appClientId appClientSecret:(nullable NSString *)appClientSecret scopes:(NSSet<NSString*> *)scopes signInRedirectUri:(NSString *)signInRedirectUri signOutRedirectUri:(NSString *)signOutRedirectUri webDomain:(NSString *)webDomain identityProvider:(nullable NSString *)identityProvider idpIdentifier:(nullable NSString *)idpIdentifier userPoolIdForEnablingASF:(nullable NSString *)userPoolIdForEnablingASF

Parameters

appClientId

The app client id

appClientSecret

The optional app client secret

scopes

Set of scopes to obtain

signInRedirectUri

uri to redirect on sign in. Must be configured as a uri scheme in your info.plist

signOutRedirectUri

uri to redirect on sign out. Must be configured as a uri scheme in your info.plist

webDomain

The FQDN of your Cognito endpoint, something like https://mydomain.region.auth.amazoncognito.com

identityProvider

Optional provider name to authenticate with directly

idpIdentifier

Optional provider identifier to authenticate with directly

userPoolIdForEnablingASF

Optional user pool id for enabling advanced security features

Declared In

AWSCognitoAuth.h

– initWithAppClientId:appClientSecret:scopes:signInRedirectUri:signOutRedirectUri:webDomain:identityProvider:idpIdentifier:userPoolIdForEnablingASF:enableSFAuthSessionIfAvailable:

Configuration object for CognitoAuth

- (instancetype)initWithAppClientId:(NSString *)appClientId appClientSecret:(nullable NSString *)appClientSecret scopes:(NSSet<NSString*> *)scopes signInRedirectUri:(NSString *)signInRedirectUri signOutRedirectUri:(NSString *)signOutRedirectUri webDomain:(NSString *)webDomain identityProvider:(nullable NSString *)identityProvider idpIdentifier:(nullable NSString *)idpIdentifier userPoolIdForEnablingASF:(nullable NSString *)userPoolIdForEnablingASF enableSFAuthSessionIfAvailable:(BOOL)enableSFAuthSession

Parameters

appClientId

The app client id

appClientSecret

The optional app client secret

scopes

Set of scopes to obtain

signInRedirectUri

uri to redirect on sign in. Must be configured as a uri scheme in your info.plist

signOutRedirectUri

uri to redirect on sign out. Must be configured as a uri scheme in your info.plist

webDomain

The FQDN of your Cognito endpoint, something like https://mydomain.region.auth.amazoncognito.com

identityProvider

Optional provider name to authenticate with directly

idpIdentifier

Optional provider identifier to authenticate with directly

userPoolIdForEnablingASF

Optional user pool id for enabling advanced security features

enableSFAuthSession

If set true, will use SFAuthenticationSession if available. Below iOS 11, the SDK will use SFSafariViewController regardless of this setting

Declared In

AWSCognitoAuth.h