HIVE SDK for C++

Classes | Typedefs | Enumerations | Functions
Auth

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

Classes

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

Typedefs

typedef std::function< void(ResultAPI const &result, AuthInitResult const &authInitResult)> Auth::onAuthInitialize
 Notify HIVE SDK initialization result listener. More...
 
typedef std::function< void(ResultAPI const &result, LoginType loginType, Account const &currentAccount, Account const &usedAccount)> Auth::onAuthLogin
 HIVE login result listener. More...
 
typedef std::function< void(ResultAPI const &result)> Auth::onAuthLogout
 HIVE logout result listener. More...
 
typedef std::function< void(ResultAPI const &result)> Auth::onAuthShowTerms
 The result of displaying the terms and conditions. More...
 
typedef std::function< void(ResultAPI const &result, AuthMaintenanceInfo const &authMaintenanceInfo)> Auth::onAuthMaintenance
 Maintenance popup result. More...
 
typedef std::function< void(ResultAPI const &result)> Auth::onAuthAdultConfirm
 Adult verification pop-up result. More...
 

Enumerations

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

Functions

static void 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. More...
 
static LoginType Auth::getLoginType ()
 After initializing the SDK, it returns the login information that can be executed according to the existing login information. More...
 
static void Auth::login (LoginType loginType, onAuthLogin listener)
 Request HIVE login according to given login type. More...
 
static void Auth::showLoginSelection (picojson::object currentData, picojson::object selectData, 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. More...
 
static void Auth::bindLogin (std::string selectedVid, onAuthLogin listener)
 If the user selects one of the conflicting HIVE accounts, the result must be sent to the HIVE authentication server. More...
 
static void Auth::logout (onAuthLogout listener)
 Once you have completed your HIVE login, you are issued a user's unique ID, VID, and session key. More...
 
static Account Auth::getAccount ()
 Returns the authentication information of HIVE user. More...
 
static void Auth::showTerms (onAuthShowTerms listener)
 Display HIVE Terms and Conditions. More...
 
static void Auth::checkMaintenance (bool isShow, onAuthMaintenance listener)
 Display the maintenance status and return data. More...
 
static void Auth::showAdultConfirm (onAuthAdultConfirm listener)
 Request adult verification. More...
 
static void Auth::reset ()
 Initialize all data used by the SDK, including authentication information. More...
 
static void Auth::requestPermissionViewData (onAuthRequestPermissionViewData listener)
 권한고지 팝업을 구성하기 위한 데이터를 얻습니다. More...
 

Detailed Description

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



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

The detailed functions provided by this class are as follows.

Typedef Documentation

◆ onAuthAdultConfirm

typedef std::function<void(ResultAPI const & result)> Auth::onAuthAdultConfirm

Adult verification pop-up result.

Parameters
resultAPI call result

◆ onAuthInitialize

typedef std::function<void(ResultAPI const & result, AuthInitResult const & authInitResult)> Auth::onAuthInitialize

Notify HIVE SDK initialization result listener.

Parameters
resultAPI call result
authInitResultHIVE SDK initialization result

◆ onAuthLogin

typedef std::function<void(ResultAPI const & result, LoginType loginType, Account const & currentAccount, Account const & usedAccount)> Auth::onAuthLogin

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

typedef std::function<void(ResultAPI const & result)> Auth::onAuthLogout

HIVE logout result listener.

Parameters
resultAPI call result

◆ onAuthMaintenance

typedef std::function<void(ResultAPI const & result, AuthMaintenanceInfo const & authMaintenanceInfo)> Auth::onAuthMaintenance

Maintenance popup result.

Parameters
resultAPI call result
authMaintenanceInfoData for pop-ups in game

◆ onAuthShowTerms

typedef std::function<void(ResultAPI const & result)> Auth::onAuthShowTerms

The result of displaying the terms and conditions.

Parameters
resultAPI call result

Enumeration Type Documentation

◆ AuthMaintenanceActionType

enum class AuthMaintenanceActionType
strong

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

Enumerator
OPEN_URL 

외부 부라우저로 전달된 url 을 실행

EXIT 

앱 종료

DONE 

아무 처리도 하지 않음.

◆ LoginType

enum class LoginType
strong

HIVE login type definition.

Enumerator
GUEST 

HIVE 게스트 로그인

ACCOUNT 

HIVE 로그인

SELECT 

계정 충돌로 인한 유저 선택이 필요한 경우

AUTO 

게스트 로그인이나 HIVE 로그인되어 있는 상태
(단말에 세션키가 남아 있는 상태)

Function Documentation

◆ bindLogin()

static void Auth::bindLogin ( std::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 Auth::checkMaintenance ( bool  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 listener

◆ getAccount()

static Account Auth::getAccount ( )
static

Returns the authentication information of HIVE user.

Returns
The authentication information of HIVE user
See also
Account

◆ getLoginType()

static LoginType 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 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 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 Auth::logout ( onAuthLogout  listener)
static

Once you have completed your HIVE login, you are issued a user's unique ID, VID, and session key.


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

Parameters
listenerAPI call result listener

◆ requestPermissionViewData()

static void 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
listener성인 인증 결과 통지

◆ reset()

static void Auth::reset ( )
static

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


Used for HIVE SDK interworking and testing.

◆ showAdultConfirm()

static void 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 listener

◆ showLoginSelection()

static void Auth::showLoginSelection ( picojson::object  currentData,
picojson::object  selectData,
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
currentDataInformation of logged in user
selectDataUser information registered in HIVE authentication server
listenerAPI call result

◆ showTerms()

static void 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