TCGBAuthAdapterDelegate Protocol Reference

Conforms to NSObject
Declared in TCGBAuthAdapterDelegate.h

Overview

The protocol TCGBPurchasable is for developing Auth Adapter.
This protocol contains several methods such as to login, logout and so on.

Initilaize Auth Adapter

– initializeWithOptions:

This method ininialize the Auth Adapter class.

- (void)initializeWithOptions:(NSDictionary *)options

Parameters

options

isDebugMode is for setting debug mode of ToastCloud IAP module.

Declared In

TCGBAuthAdapterDelegate.h

Authentication API

– loginWithSender:target:additionalInfo:viewController:completion: required method

Login to identity service provider.

- (void)loginWithSender:(id)sender target:(id<TCGBAuthAdapterDelegate>)target additionalInfo:(NSDictionary *)additionalInfo viewController:(UIViewController *)viewController completion:(void ( ^ ) ( id credential , TCGBError *error ))completion

Parameters

sender

sender instance

target

target instance

additionalInfo

If identity provider needs to set something when it is initialized, this additionanlInfo is set.

viewController

presenting view controller

completion

completion handler when auth process(login, logout, withdraw) is completed.

Declared In

TCGBAuthAdapterDelegate.h

– logoutWithSender:target:completion: required method

Logout to identity service provider.

- (void)logoutWithSender:(id)sender target:(id<TCGBAuthAdapterDelegate>)target completion:(void ( ^ ) ( TCGBError *error ))completion

Parameters

sender

sender instance

target

target instance

completion

completion handler when auth process(login, logout, withdraw) is completed.

Declared In

TCGBAuthAdapterDelegate.h

– withdrawWithSender:target:completion: required method

Withdrwal to identity service provider.

- (void)withdrawWithSender:(id)sender target:(id<TCGBAuthAdapterDelegate>)target completion:(void ( ^ ) ( TCGBError *error ))completion

Parameters

sender

sender instance

target

target instance

completion

completion handler when auth process(login, logout, withdraw) is completed.

Declared In

TCGBAuthAdapterDelegate.h

– addMappingWithSender:target:additionalInfo:viewController:completion:

Mapping to identity service provider.

- (void)addMappingWithSender:(id)sender target:(id<TCGBAuthAdapterDelegate>)target additionalInfo:(NSDictionary *)additionalInfo viewController:(UIViewController *)viewController completion:(void ( ^ ) ( id credential , TCGBError *error ))completion

Parameters

sender

sender instance

target

target instance

additionalInfo

If identity provider needs to set something when it is initialized, this additionanlInfo is set.

completion

completion handler when auth process(login, logout, withdraw) is completed.

Declared In

TCGBAuthAdapterDelegate.h

Provider information

– authInfosFromProvider

Provider’s authenticated credential

- (TCGBProviderAuthCredential *)authInfosFromProvider

Return Value

Provider’s authenticated credential

Declared In

TCGBAuthAdapterDelegate.h

– providerName

Provider’s name

- (NSString *)providerName

Return Value

Provider’s name

Declared In

TCGBAuthAdapterDelegate.h

Application life cycle for identify provider's sdk setting

– application:willFinishLaunchingWithOptions:

Managing State Transitions

- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions

Declared In

TCGBAuthAdapterDelegate.h

– application:didReceiveRemoteNotification:fetchCompletionHandler:

Responding to Notifications and Events

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler

Declared In

TCGBAuthAdapterDelegate.h

– application:openURL:options:

handle OpenURL

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options

Declared In

TCGBAuthAdapterDelegate.h