HIVE SDK for iOS

HIVEAuth.h
Go to the documentation of this file.
1 
46 #import <Foundation/Foundation.h>
47 #import "HIVEPromotion.h"
48 
49 @class HIVEResultAPI;
50 @class HIVEAuthMaintenanceExtraButton;
51 @class HIVEPermissionViewData;
52 
60 typedef NS_ENUM(NSUInteger, HIVELoginType) {
61  kHIVELoginTypeGUEST = 0,
62  kHIVELoginTypeACCOUNT,
63  kHIVELoginTypeSELECT,
64  kHIVELoginTypeAUTO,
65 };
66 
67 
68 
69 
77 typedef NS_ENUM(NSUInteger, HIVEAuthMaintenanceActionType) {
78 
79  kHIVEAuthMaintenanceActionTypeOPEN_URL = 1,
80  kHIVEAuthMaintenanceActionTypeEXIT,
81  kHIVEAuthMaintenanceActionTypeDONE
82 };
83 
84 
85 
93 @interface HIVEAccount : NSObject <NSCopying>
94 
95  @property (nonatomic, copy) NSString *vid;
96  @property (nonatomic, copy) NSString *uid;
97  @property (nonatomic, copy) NSString *did;
98  @property (nonatomic, copy) NSString *accessToken;
99 
100  -(instancetype)initWith:(NSString *)vid
101  uid:(NSString *)uid
102  did:(NSString *)did
103  accessToken:(NSString *)accessToken;
104 
105  -(NSString *)toJson;
106 
107 -(NSString *)privacySafeDescription;
108 
109 @end
110 
111 
119 @interface HIVEAuthInitResult : NSObject <NSCopying>
120 
121  @property BOOL isAuthorized;
122 
137  @property HIVELoginType loginType;
138 
139  @property (nonatomic, copy) NSString *did;
140 
141  -(instancetype)initWith:(BOOL)isAuthorized
142  loginType:(HIVELoginType)loginType
143  did:(NSString *)did;
144 
145  -(NSString *)toJson;
146 
147 @end
148 
149 
157 @interface HIVEAuthMaintenanceInfo : NSObject <NSCopying>
158 
159  @property (nonatomic, copy) NSString *title;
160  @property (nonatomic, copy) NSString *message;
161  @property (nonatomic, copy) NSString *button;
162  @property (nonatomic) HIVEAuthMaintenanceActionType action;
163  @property (nonatomic, copy) NSString *url;
164  @property (nonatomic) NSUInteger remainingTime;
165 
166  @property (nonatomic, copy) NSString *customerButton;
167  @property (nonatomic, copy) NSString *customerLink;
168 
169  @property (nonatomic, copy) NSMutableArray *exButtons;
170 
171  - (NSString *)toJson;
172 
173 @end
174 
175 @interface HIVEAuthMaintenanceExtraButton : NSObject <NSCopying>
176 
177  @property (nonatomic) HIVEAuthMaintenanceActionType action;
178  @property (nonatomic, copy) NSString *url;
179  @property (nonatomic, copy) NSString *button;
180 
181  - (NSString *)toJson;
182 
183 @end
184 
185 
186 
187 
202 typedef void (^HIVEAuthInitializeHandler)(HIVEResultAPI* result, HIVEAuthInitResult *authInitResult);
203 
204 
223 typedef void (^HIVEAuthLoginHandler)(HIVEResultAPI* result, HIVELoginType loginType, HIVEAccount *currentAccount, HIVEAccount *usedAccount);
224 
225 
238 typedef void (^HIVEAuthLogoutHandler)(HIVEResultAPI* result);
239 
240 
255 typedef void (^HIVEAuthMaintenanceHandler) (HIVEResultAPI* result, HIVEAuthMaintenanceInfo *maintenanceInfo);
256 
257 
270 typedef void (^HIVEAuthShowTermsHandler)(HIVEResultAPI* result);
271 
272 
273 
286 // REMOVE: 성인인증 안쓰는데 남겨둬야 하는가?
287 typedef void (^HIVEAuthAdultConfirmHandler) (HIVEResultAPI* result);
288 
289 
290 
291 
326 @interface HIVEAuth : NSObject
327 
328 
343 + (void)initialize:(HIVEAuthInitializeHandler)handler;
344 
345 
358 + (HIVELoginType)getLoginType;
359 
360 
379 + (void)login:(HIVELoginType)loginType handler:(HIVEAuthLoginHandler)handler;
380 
381 
400 + (void)showLoginSelection:(NSDictionary <NSString *, NSObject *> *)currentData
401  usedData:(NSDictionary<NSString *,NSObject *> *)usedData
402  handler:(HIVEAuthLoginHandler)handler;
403 
404 
421 + (void)bindLogin:(NSString *)selectedVid handler:(HIVEAuthLoginHandler)handler;
422 
423 
440 + (void)logout:(HIVEAuthLogoutHandler)handler;
441 
442 
458 
459 
476 + (void)showTerms:(HIVEAuthShowTermsHandler)handler;
477 
478 
499 + (void)checkMaintenance:(BOOL)isShow handler:(HIVEAuthMaintenanceHandler)handler;
500 
501 
516 // REMOVE: 성인인증 기능 더이상 지원하지 않음
517 + (void)showAdultConfirm:(HIVEAuthAdultConfirmHandler)handler;
518 
519 
531 + (void)reset;
532 
533 
534 + (void)setFacebookPermission:(NSArray *) permission;
535 
550 + (void)requestPermissionViewData:(void(^)(HIVEResultAPI *result, HIVEPermissionViewData *data))handler __deprecated_msg("Use Configration.getPermissionViewData");
551 
552 
553 + (BOOL)setEmergencyMode;
554 
555 @end
556 
NSString * uid
User unique ID for HIVE Social.
Definition: HIVEAuth.h:96
typedef NS_ENUM(NSUInteger, HIVELoginType)
HIVE login type definition.
Definition: HIVEAuth.h:60
void(^ HIVEAuthInitializeHandler)(HIVEResultAPI *result, HIVEAuthInitResult *authInitResult)
Notify HIVE SDK initialization result listener.
Definition: HIVEAuth.h:202
void reset()
Initialize all data used by the SDK, including authentication information.
Definition: HIVEAuth.m:375
NSString * vid
If you perform HIVE login, the unique ID of the user issued for each game.
Definition: HIVEAuth.h:95
void(^ HIVEAuthAdultConfirmHandler)(HIVEResultAPI *result)
Adult verification pop-up result.
Definition: HIVEAuth.h:287
Provides HIVE SDK initialization and HIVE authentication functions The HIVE SDK performs initializat...
Definition: HIVEAuth.h:326
API 호출에 대한 결과를 담는 클래스
Definition: HIVEResultAPI.h:25
HIVELoginType getLoginType()
After initializing the SDK, it returns the login information that can be executed according to the ex...
Definition: HIVEAuth.m:210
void(^ HIVEAuthLogoutHandler)(HIVEResultAPI *result)
HIVE logout result listener.
Definition: HIVEAuth.h:238
void(^ HIVEAuthMaintenanceHandler)(HIVEResultAPI *result, HIVEAuthMaintenanceInfo *maintenanceInfo)
Maintenance popup result.
Definition: HIVEAuth.h:255
void(^ HIVEAuthShowTermsHandler)(HIVEResultAPI *result)
The result of displaying the terms and conditions.
Definition: HIVEAuth.h:270
void(^ HIVEAuthLoginHandler)(HIVEResultAPI *result, HIVELoginType loginType, HIVEAccount *currentAccount, HIVEAccount *usedAccount)
HIVE login result listener.
Definition: HIVEAuth.h:223
BOOL isAuthorized
HIVE (account) login history (True: Has HIVE login history, false: No HIVE login history) ...
Definition: HIVEAuth.h:121
HIVEAccount * getAccount()
Returns the authentication information of HIVE user.
Definition: HIVEAuth.m:299
HIVELoginType loginType
HIVE Login type If GUEST, login to GUEST If ACCOUNT, DO HIVE login (based on id/password) If SELE...
Definition: HIVEAuth.h:137
NSString * did
Unique ID issued to each device.
Definition: HIVEAuth.h:97
NSString * accessToken
Shared session key issued by the HIVE authentication server to verify the validity of the HIVE login...
Definition: HIVEAuth.h:98
HIVE authentication user information.
Definition: HIVEAuth.h:93
Server maintenance and update status information.
Definition: HIVEAuth.h:157
Information to be delivered when the result is notified after HIVE SDK initialization.
Definition: HIVEAuth.h:119
Copyright © GAMEVIL COM2US PLATFORM Inc. All Right Reserved. Terms of Use Privacy Policy