HIVE SDK for Unity3D

Classes | Enumerations | Functions
Auth

Classes

class  hive.Auth
 Provides HIVE SDK initialization and HIVE authentication functions
The HIVE SDK performs initialization based on the xml configuration file. More...
 
class  hive.Account
 HIVE authentication user information. More...
 
class  hive.AuthInitResult
 Information to be delivered when the result is notified after HIVE SDK initialization. More...
 
class  hive.AuthMaintenanceInfo
 Server maintenance and update status information. More...
 

Enumerations

enum  hive.LoginType { hive.LoginType.GUEST , hive.LoginType.ACCOUNT , hive.LoginType.SELECT , hive.LoginType.AUTO }
 HIVE login type definition. More...
 
enum  hive.AuthMaintenanceActionType { hive.AuthMaintenanceActionType.OPEN_URL , hive.AuthMaintenanceActionType.EXIT , hive.AuthMaintenanceActionType.DONE }
 Definition of actions to be taken when the button is pressed on the maintenance popup. More...
 

Functions

delegate void hive.Auth.onAuthInitialize (ResultAPI result, AuthInitResult authInitResult)
 Notify HIVE SDK initialization result listener.
 
delegate void hive.Auth.onAuthLogin (ResultAPI result, LoginType loginType, Account currentAccount, Account usedAccount)
 HIVE login result listener.
 
delegate void hive.Auth.onAuthLogout (ResultAPI result)
 HIVE logout result listener.
 
delegate void hive.Auth.onAuthShowTerms (ResultAPI result)
 The result of displaying the terms and conditions.
 
delegate void hive.Auth.onAuthMaintenance (ResultAPI result, AuthMaintenanceInfo authMaintenanceInfo)
 Maintenance popup result.
 
delegate void hive.Auth.onAuthAdultConfirm (ResultAPI result)
 Adult verification pop-up result.
 
static void hive.Auth.initialize (onAuthInitialize listener)
 Initialize HIVE SDK
If the app is launched for the first time, you will be exposed to the terms and acceptance process.
 
static LoginType hive.Auth.getLoginType ()
 After initializing the SDK, it returns the login information that can be executed according to the existing login information.
 
static void hive.Auth.login (LoginType loginType, onAuthLogin listener)
 Request HIVE login according to given login type.
 
static void hive.Auth.showLoginSelection (JSONObject currentVidData, JSONObject usedVidData, onAuthLogin listener)
 Performing a HIVE login while logged in as a guest may result in account conflicts and require the user to switch HIVE accounts.
 
static void hive.Auth.bindLogin (String selectedVid, onAuthLogin listener)
 If the user selects one of the conflicting HIVE accounts, the result must be sent to the HIVE authentication server.
 
static void hive.Auth.logout (onAuthLogout listener)
 
static Account hive.Auth.getAccount ()
 Returns the authentication information of HIVE user.
 
static void hive.Auth.showTerms (onAuthShowTerms listener)
 Display HIVE Terms and Conditions.
 
static void hive.Auth.checkMaintenance (Boolean isShow, onAuthMaintenance listener)
 Display the maintenance status and return data.
 
static void hive.Auth.showAdultConfirm (onAuthAdultConfirm listener)
 Request adult verification.
 
static void hive.Auth.reset ()
 Initialize all data used by the SDK, including authentication information.
 
static void hive.Auth.requestPermissionViewData (onAuthRequestPermissionViewData listener)
 권한고지 팝업을 구성하기 위한 데이터를 얻습니다.
 

Detailed Description

Provides HIVE SDK initialization and HIVE authentication functions
The HIVE SDK performs initialization based on the xml configuration file.

Enumeration Type Documentation

◆ AuthMaintenanceActionType

Definition of actions to be taken when the button is pressed on the maintenance popup.

Enumerator
OPEN_URL 

Run url passed to external browser.

EXIT 

Finish app.

DONE 

Do nothing.

◆ LoginType

HIVE login type definition.

Enumerator
GUEST 

HIVE Guest login.

ACCOUNT 

HIVE Login.

SELECT 

When user selection is required due to account conflict.

AUTO 

Guest logged in or HIVE logged in
(The session key remains in device)

Function Documentation

◆ bindLogin()

static void hive.Auth.bindLogin ( String selectedVid,
onAuthLogin listener )
static

If the user selects one of the conflicting HIVE accounts, the result must be sent to the HIVE authentication server.


Calling this method sends the result to the HIVE authentication server with the given user's unique ID.

Parameters
selectedVidThe unique ID of the user selected by the user
listenerAPI call result listener

◆ checkMaintenance()

static void hive.Auth.checkMaintenance ( Boolean isShow,
onAuthMaintenance listener )
static

Display the maintenance status and return data.


When the HIVE SDK initialization is completed, you need to check the server maintenance and update status.
Server maintenance and update can block lower version after update of game client, or block game connection during game server maintenance time.
HIVE provides a function to show popups in the order of server maintenance, game forced update and notice in accordance with the information set in the back office.

Parameters
isShowWhether to show maintenance popups in HIVE SDK
If this value is true, maintenance popup UI provided by HIVE SDK is used, if false, data for customizing UI is received.
listenerAPI call result

◆ getAccount()

static Account hive.Auth.getAccount ( )
static

Returns the authentication information of HIVE user.

Returns
The authentication information of HIVE user
See also
Account

◆ getLoginType()

static LoginType hive.Auth.getLoginType ( )
static

After initializing the SDK, it returns the login information that can be executed according to the existing login information.

Returns
Possible login type

◆ initialize()

static void hive.Auth.initialize ( onAuthInitialize listener)
static

Initialize HIVE SDK
If the app is launched for the first time, you will be exposed to the terms and acceptance process.

Parameters
listenerAPI call result

◆ login()

static void hive.Auth.login ( LoginType loginType,
onAuthLogin listener )
static

Request HIVE login according to given login type.

Parameters
loginTypeGUEST : HIVE Guest login
ACCOUNT : HIVE Login
AUTO : Auto Login (session key remains in the device)
listenerAPI call result

◆ logout()

static void hive.Auth.logout ( onAuthLogout listener)
static
    \~korean 
   @brief HIVE 로그인을 완료 하였으면 유저의 고유 ID 인 VID 와 세션키가 발급된 상태이다.<br/>
   로그 아웃을 요청하면 VID 와 세션키를 초기화 하는 기능을 수행한다<br/>
   (주의 : 게스트 로그인시에는 절대 로그 아웃 금지)

   @param listener      API 호출 결과 통지
    \~english 
   @brief Once you have completed your HIVE login, you are issued a user's unique ID, VID, and session key. <br/>

     * When requesting logout, it initializes VID and session key
(Note: Never logout at guest login)

Parameters
listenerAPI call result listener

◆ onAuthAdultConfirm()

delegate void hive.Auth.onAuthAdultConfirm ( ResultAPI result)

Adult verification pop-up result.

Parameters
resultAPI call result

◆ onAuthInitialize()

delegate void hive.Auth.onAuthInitialize ( ResultAPI result,
AuthInitResult authInitResult )

Notify HIVE SDK initialization result listener.

Parameters
resultAPI call result
authInitResultHIVE SDK initialization result

◆ onAuthLogin()

delegate void hive.Auth.onAuthLogin ( ResultAPI result,
LoginType loginType,
Account currentAccount,
Account usedAccount )

HIVE login result listener.

Parameters
resultAPI call result
loginTypeHIVE login type according to HIVE login result
If loginType is LoginType.SELECT, it should ask user selection according to HIVE account conflict.
currentAccountHIVE account information of user who completed HIVE login
usedAccountHive account information of user who registered in HIVE authentication server

◆ onAuthLogout()

delegate void hive.Auth.onAuthLogout ( ResultAPI result)

HIVE logout result listener.

Parameters
resultAPI call result

◆ onAuthMaintenance()

delegate void hive.Auth.onAuthMaintenance ( ResultAPI result,
AuthMaintenanceInfo authMaintenanceInfo )

Maintenance popup result.

Parameters
resultAPI call result
authMaintenanceInfoData for pop-ups in game

◆ onAuthShowTerms()

delegate void hive.Auth.onAuthShowTerms ( ResultAPI result)

The result of displaying the terms and conditions.

Parameters
resultAPI call result

◆ requestPermissionViewData()

static void hive.Auth.requestPermissionViewData ( onAuthRequestPermissionViewData listener)
static

권한고지 팝업을 구성하기 위한 데이터를 얻습니다.


ResultAPI의 result가 success이며, result의 code가 AuthV4SkipPermissionView 혹은 AuthSkipPermissionView가 아닐 경우 권한고지 데이터를 이용하여 권한고지를 출력 할 수있습니다. PermissionViewData를 참조하여 데이터를 이용하여 UI를 구성하세요. 이 함수를 호출하여 권한고지팝업을 구성할 시 AuthV4.setup, Auth.initialize를 호출하였을때 HIVE SDK의 권한고지 팝업은 나오지 않습니다.

Warning
code가 AuthV4SkipPermissionView 혹은 AuthSkipPermissionView가 왔을 경우 PermissionViewData에는 빈값이 오게됩니다. 값을 참조할 경우 예기치못한 오류가 발생할 수 있으므로 주의 해주세요. 또한 위 코드는 ResultAPI Success일 경우만 오게됩니다.
See also
PermissionViewData
ResultAPI
Parameters
handler성인 인증 결과 통지

◆ reset()

static void hive.Auth.reset ( )
static

Initialize all data used by the SDK, including authentication information.


Used for HIVE SDK interworking and testing.

◆ showAdultConfirm()

static void hive.Auth.showAdultConfirm ( onAuthAdultConfirm listener)
static

Request adult verification.


For some games that require adult verification, such as GoStop / poker, adult verification is provided.

Parameters
listenerAdult verification result

◆ showLoginSelection()

static void hive.Auth.showLoginSelection ( JSONObject currentVidData,
JSONObject usedVidData,
onAuthLogin listener )
static

Performing a HIVE login while logged in as a guest may result in account conflicts and require the user to switch HIVE accounts.


Calling this method shows a dialog box to the user to select one of the conflicting accounts.

Parameters
currentVidDataInformation of logged in user
usedVidDataUser information registered in HIVE authentication server
listenerAPI call result

◆ showTerms()

static void hive.Auth.showTerms ( onAuthShowTerms listener)
static

Display HIVE Terms and Conditions.


When HIVE SDK is initialized, the user will go through the agreement process.
After this, the game should expose Personal information processing policies and terms and services in the game settings.

Parameters
listenerAPI call result listener
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy