Files
FinalYearProject-MyMind/My Broken Mind/My Mind/AmazonAws/AWSMobileHubHelper.framework/Headers/AWSSignInProvider.h
Alexander Davis 0018e82ee5 App Completed
Basic Prototype App Completed. Proposal, Literature Review and Final
Report to Follow.
2017-04-13 18:18:38 +01:00

84 lines
2.4 KiB
Objective-C
Executable File

//
// AWSSignInProvider.h
//
// Copyright 2016 Amazon.com, Inc. or its affiliates (Amazon). All Rights Reserved.
//
// Code generated by AWS Mobile Hub. Amazon gives unlimited permission to
// copy, distribute and modify it.
//
#import <UIKit/UIKit.h>
#import <AWSCore/AWSCore.h>
NS_ASSUME_NONNULL_BEGIN
@class AWSIdentityManager;
/**
* `AWSSignInProvider` protocol defines a list of methods and properties which a Sign-In Provider should implement.
*
* The AWSSignInProvider is implemented by difference Sign-In Providers like FacbookSignInProvider, GoogleSignInProvider, etc.
*
*/
@protocol AWSSignInProvider <AWSIdentityProvider>
/**
Determines if a user is logged in.
*/
@property (nonatomic, readonly, getter=isLoggedIn) BOOL loggedIn;
/**
The URL for profile image of a user.
*/
@property (nonatomic, readonly, nullable) NSURL *imageURL;
/**
The User Name of a user.
*/
@property (nonatomic, readonly, nullable) NSString *userName;
/**
The login handler method for the Sign-In Provider.
The completionHandler will bubble back errors to the developers.
*/
- (void)login:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler;
/**
The logout handler method for the Sign-In Provider.
*/
- (void)logout;
/**
* Call this method on a successful login. This method should store a flag in persistent storage which determines if the user has signed-in using this sign-in provider.
* This method is called by AWSIdentityManager on `interceptApplication:didFinishLaunchingWithOptions` method to set the current sign-in provider.
*/
- (void)setCachedLoginFlag;
/**
* Clears the cached login flag. This method should be called during `logout` to clear the stored flag.
*/
- (void)clearCachedLoginFlag;
/**
* Fetches the status of the cached login flag set using `setCachedLoginFlag`.
*
* @return `YES` if the setCachedLoginFlag is set.
*/
- (BOOL)isCachedLoginFlagSet;
/**
The handler method for managing the session reload for the Sign-In Provider.
*/
- (void)reloadSession;
- (BOOL)interceptApplication:(UIApplication *)application
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
- (BOOL)interceptApplication:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(nullable NSString *)sourceApplication
annotation:(id)annotation;
@end
NS_ASSUME_NONNULL_END