AWSIdentityManager Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | AWSIdentityProviderManager |
| Declared in | AWSIdentityManager.h AWSIdentityManager.m |
loggedIn
Indicates whether the user is signed-in or not.
@property (nonatomic, readonly, getter=isLoggedIn) BOOL loggedInReturn Value
true if user is signed-in
Declared In
AWSIdentityManager.h
imageURL
URL for the user’s image, if user is signed-in with a third party identity provider, like Facebook or Google.
@property (nonatomic, readonly, nullable) NSURL *imageURLReturn Value
url of image file, if user is signed-in
Declared In
AWSIdentityManager.h
userName
User name acquired from third party identity provider, such as Facebook or Google.
@property (nonatomic, readonly, nullable) NSString *userNameReturn Value
user name, if user is signed-in
Declared In
AWSIdentityManager.h
identityId
Amazon Cognito User Identity ID. This uniquely identifies the user, regardless of whether or not the user is signed-in, if User Sign-in is enabled in the project.
@property (nonatomic, readonly, nullable) NSString *identityIdReturn Value
unique user identifier
Declared In
AWSIdentityManager.h
credentialsProvider
Amazon Cognito Credentials Provider. This is the credential provider used by the Identity Manager.
@property (nonatomic, readonly, strong) AWSCognitoCredentialsProvider *credentialsProviderReturn Value
the cognito credentials provider
Declared In
AWSIdentityManager.h
+ defaultIdentityManager
Returns the Identity Manager singleton instance configured using the information provided in Info.plist file.
+ (instancetype)defaultIdentityManagerDiscussion
Swift
let identityManager = AWSIdentityManager.defaultIdentityManager()
Objective-C
AWSIdentityManager *identityManager = [AWSIdentityManager defaultIdentityManager];
Declared In
AWSIdentityManager.h
– logoutWithCompletionHandler:
Signs the user out of whatever third party identity provider they used to sign in.
- (void)logoutWithCompletionHandler:(void ( ^ ) ( id _Nullable result , NSError *_Nullable error ))completionHandlerParameters
completionHandler |
used to callback application with async operation results |
|---|
Declared In
AWSIdentityManager.h
– loginWithSignInProvider:completionHandler:
Signs the user in with an identity provider. Note that even if User Sign-in is not enabled in the project, the user is still signed-in with the Guest type provider.
- (void)loginWithSignInProvider:(id<AWSSignInProvider>)signInProvider completionHandler:(void ( ^ ) ( id _Nullable result , NSError *_Nullable error ))completionHandlerParameters
completionHandler |
used to callback application with async operation results |
|---|---|
signInProviderType |
provider type |
Declared In
AWSIdentityManager.h
– resumeSessionWithCompletionHandler:
Attempts to resume session with the previous sign-in provider.
- (void)resumeSessionWithCompletionHandler:(void ( ^ ) ( id _Nullable result , NSError *_Nullable error ))completionHandlerParameters
completionHandler |
used to callback application with async operation results |
|---|
Declared In
AWSIdentityManager.h
– interceptApplication:didFinishLaunchingWithOptions:
Passes parameters used to launch the application to the current identity provider. For some
third party providers, this completes the User Sign-in call flow, which used a browser to
get information from the user, directly. The current sign-in provider will be set to nil if
the sign-in provider is not registered using registerAWSSignInProvider:forKey method of
AWSSignInProviderFactory class.
- (BOOL)interceptApplication:(UIApplication *)application didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptionsParameters
application |
application |
|---|---|
launchOptions |
options used to launch the application |
Return Value
true if this call handled the operation
Declared In
AWSIdentityManager.h
– interceptApplication:openURL:sourceApplication:annotation:
Passes parameters used to launch the application to the current identity provider. For some third party providers, this completes the User Sign-in call flow, which used a browser to get information from the user, directly.
- (BOOL)interceptApplication:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotationParameters
application |
application |
|---|---|
url |
url used to open the application |
sourceApplication |
source application |
annotation |
annotation |
Return Value
true if this call handled the operation
Declared In
AWSIdentityManager.h