AWSCognitoAuthConfiguration
Objective-C
@interface AWSCognitoAuthConfiguration : NSObject
Swift
class AWSCognitoAuthConfiguration : NSObject
Houses all configuration for AWSCognitoAuth
-
The app client id
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull appClientId;
Swift
var appClientId: String { get }
-
The optional app client secret
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *appClientSecret;
Swift
var appClientSecret: String? { get }
-
The scopes
Declaration
Objective-C
@property (nonatomic, readonly) NSSet<NSString *> *_Nonnull scopes;
Swift
var scopes: Set<String> { get }
-
uri to redirect on sign in. Must be configured as a uri scheme in your info.plist
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull signInRedirectUri;
Swift
var signInRedirectUri: String { get }
-
uri to redirect on sign out. Must be configured as a uri scheme in your info.plist
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull signOutRedirectUri;
Swift
var signOutRedirectUri: String { get }
-
The FQDN of your Cognito endpoint, something like https://mydomain.region.auth.amazoncognito.com
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull webDomain;
Swift
var webDomain: String { get }
-
The optional provider name to authenticate with directly instead of presenting the end user with a list of configured providers
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *identityProvider;
Swift
var identityProvider: String? { get }
-
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.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *idpIdentifier;
Swift
var idpIdentifier: String? { get }
-
The optional user pool id, required if you have enabled advanced security features on your pool.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *userPoolId;
Swift
var userPoolId: String? { get }
-
Whether user context information to drive the advanced security feature is emitted.
Declaration
Objective-C
@property (nonatomic, readonly, getter=isASFEnabled) BOOL asfEnabled;
Swift
var isASFEnabled: Bool { get }
-
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.Declaration
Objective-C
@property (nonatomic, readonly) BOOL isSFAuthenticationSessionEnabled;
Swift
var isSFAuthenticationSessionEnabled: Bool { get }
-
Configuration object for CognitoAuth
Declaration
Objective-C
- (nonnull instancetype) initWithAppClientId:(nonnull NSString *)appClientId appClientSecret:(nullable NSString *)appClientSecret scopes:(nonnull NSSet<NSString *> *)scopes signInRedirectUri:(nonnull NSString *)signInRedirectUri signOutRedirectUri:(nonnull NSString *)signOutRedirectUri webDomain:(nonnull NSString *)webDomain;
Swift
init(appClientId: String, appClientSecret: String?, scopes: Set<String>, signInRedirectUri: String, signOutRedirectUri: String, webDomain: String)
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
-
-initWithAppClientId:
appClientSecret: scopes: signInRedirectUri: signOutRedirectUri: webDomain: identityProvider: idpIdentifier: userPoolIdForEnablingASF: Configuration object for CognitoAuth
Declaration
Objective-C
- (nonnull instancetype) initWithAppClientId:(nonnull NSString *)appClientId appClientSecret:(nullable NSString *)appClientSecret scopes:(nonnull NSSet<NSString *> *)scopes signInRedirectUri:(nonnull NSString *)signInRedirectUri signOutRedirectUri:(nonnull NSString *)signOutRedirectUri webDomain:(nonnull NSString *)webDomain identityProvider:(nullable NSString *)identityProvider idpIdentifier:(nullable NSString *)idpIdentifier userPoolIdForEnablingASF:(nullable NSString *)userPoolIdForEnablingASF;
Swift
init(appClientId: String, appClientSecret: String?, scopes: Set<String>, signInRedirectUri: String, signOutRedirectUri: String, webDomain: String, identityProvider: String?, idpIdentifier: String?, userPoolIdForEnablingASF: String?)
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
-
-initWithAppClientId:
appClientSecret: scopes: signInRedirectUri: signOutRedirectUri: webDomain: identityProvider: idpIdentifier: userPoolIdForEnablingASF: enableSFAuthSessionIfAvailable: Configuration object for CognitoAuth
Declaration
Objective-C
- (nonnull instancetype) initWithAppClientId:(nonnull NSString *)appClientId appClientSecret:(nullable NSString *)appClientSecret scopes:(nonnull NSSet<NSString *> *)scopes signInRedirectUri:(nonnull NSString *)signInRedirectUri signOutRedirectUri:(nonnull NSString *)signOutRedirectUri webDomain:(nonnull NSString *)webDomain identityProvider:(nullable NSString *)identityProvider idpIdentifier:(nullable NSString *)idpIdentifier userPoolIdForEnablingASF:(nullable NSString *)userPoolIdForEnablingASF enableSFAuthSessionIfAvailable:(BOOL)enableSFAuthSession;
Swift
init(appClientId: String, appClientSecret: String?, scopes: Set<String>, signInRedirectUri: String, signOutRedirectUri: String, webDomain: String, identityProvider: String?, idpIdentifier: String?, userPoolIdForEnablingASF: String?, enableSFAuthSessionIfAvailable enableSFAuthSession: Bool)
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 true, will use
SFAuthenticationSession
if available. Below iOS 11, the SDK will use SFSafariViewController regardless of this setting