# TCGBAuth Class Reference

Inherits from | NSObject
Declared in | TCGBAuth.h TCGBAuth.m

## Overview

TCGBAuth

Gamebase 1.6.0에서는 getLanguageInterpreter Server API를 사용하지 않기로 결정하여, 구현부만 남겨놓고 호출 하는 부분은 없는 상태임 SampleApplication에서만 호출함.

extension

## Other Methods

### `– loginWithType:additionalInfo:viewController:completion:`

1. idPLogin

`- (void)loginWithType:(NSString *)type additionalInfo:(NSDictionary *)additionalInfo viewController:(UIViewController *)viewController completion:(LoginCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– loginForLastLoggedInProvider:viewController:completion:`

1. tokenLogin

`- (void)loginForLastLoggedInProvider:(NSString *)provider viewController:(UIViewController *)viewController completion:(LoginCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– logoutWithAdditionalInfo:viewController:completion:`

1. Logout - No Server API

`- (void)logoutWithAdditionalInfo:(NSDictionary *)additionalInfo viewController:(UIViewController *)viewController completion:(LogoutCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– logoutForAllExternalSDKWithAdditionalInfo:completion:`

TAP-Client/168 : logout 호출 시에는 네트워크, 서버 처리상태와 관계 없이 항상 성공으로 처리함. (클라이언트에서 로그아웃 처리만 잘하자)

`- (void)logoutForAllExternalSDKWithAdditionalInfo:(NSDictionary *)additionalInfo completion:(LogoutCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– withdrawWithViewController:completion:`

1. Withdraw

`- (void)withdrawWithViewController:(UIViewController *)viewController completion:(WithdrawCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– addMappingWithType:additionalInfo:viewController:completion:`

1. addMapping

`- (void)addMappingWithType:(NSString *)type additionalInfo:(NSDictionary *)additionalInfo viewController:(UIViewController *)viewController completion:(LoginCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– addMappingWithCredential:viewController:completion:`

Credential을 이용한 AddMapping

`- (void)addMappingWithCredential:(NSDictionary *)credentialInfo viewController:(UIViewController *)viewController completion:(LoginCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– removeMappingWithType:viewController:completion:`

1. removeMapping

`- (void)removeMappingWithType:(NSString *)type viewController:(UIViewController *)viewController completion:(RemoveMappingCompletion)completion`

#### Declared In

`TCGBAuth.m`

### `– application:willFinishLaunchingWithOptions:`

Life Cycles

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

#### Declared In

`TCGBAuth.m`

### `– application:didReceiveRemoteNotification:fetchCompletionHandler:`

Responding to Notifications and Events

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

#### Declared In

`TCGBAuth.m`

### `– application:openURL:options:`

handle OpenURL

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

#### Declared In

`TCGBAuth.m`

### `– application:continueUserActivity:restorationHandler:`

handle UniversalLInk

`- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void ( ^ ) ( NSArray<id<UIUserActivityRestoring> > *_Nullable ))restorationHandler`

#### Declared In

`TCGBAuth.h`

### `– scene:openURLContexts:`

handle OpenURL

`- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext*> *)URLContexts`

#### Declared In

`TCGBAuth.h`

## TCGBServer Methods

### `– idPInfoInPayloadWithCredential:IDPType:`

common idPInfo in payload

`- (NSDictionary *)idPInfoInPayloadWithCredential:(TCGBProviderAuthCredential *)credential IDPType:(NSString *)IDPType`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– memberInPayload`

common member in payload

`- (NSDictionary *)memberInPayload`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– loginRequestHeader`

Request - login

`- (NSDictionary *)loginRequestHeader`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– loginRequestPayloadWithType:credential:`

1-1. OAuthProvider + (iosgamecenter) - Login Payload

`- (NSString *)loginRequestPayloadWithType:(NSString *)idpType credential:(TCGBProviderAuthCredential *)credential`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– tokenLoginRequestPayloadWithType:TCGBAccessToken:subCode:extraParams:`

1-2. Login with TCGBAccessToken - tokenLogin Payload

`- (NSString *)tokenLoginRequestPayloadWithType:(NSString *)idpType TCGBAccessToken:(NSString *)TCGBAccessToken subCode:(NSString *)subCode extraParams:(NSDictionary<NSString*,id> *)extraParams`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– logoutRequestHeader`

2-1. Logout

`- (NSDictionary *)logoutRequestHeader`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– withdrawRequestHeader`

4-1. Withdraw

`- (NSDictionary *)withdrawRequestHeader`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– addMappingRequestHeader`

5-1. addMapping Request - addMapping

`- (NSDictionary *)addMappingRequestHeader`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– removeMappingRequestHeader`

6-1. removeMapping Request - removeMapping

`- (NSDictionary *)removeMappingRequestHeader`

#### Declared In

`TCGBAuth+TCGBServer.m`

### `– TCGBAuthTokenWithResponsedData:`

Login

`- (TCGBProviderAuthToken *)TCGBAuthTokenWithResponsedData:(NSDictionary *)response`

#### Declared In

`TCGBAuth+TCGBServer.m`