HIVE SDK for C++

Modules | Classes | Typedefs | Enumerations | Functions
AuthV4

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

Modules

 AuthV4Helper
 Provides advanced features of HIVE Authentication.
 

Classes

class  ConflictViewInfo
 HIVE 인증 충돌시 view에 표시할 UI data를 구성하는 정보. More...
 
class  ProfileInfo
 User Profile Information playerID : User's unique ID
playerName : The nickname of the user to be shown outside. More...
 
class  PlayerInfo
 Sign-in User Information it includes user's tocken and DID value along with ProfileInfo. More...
 
class  ProviderInfo
 Identity Provider (IdP) Information It contains the UserId of the associated Identity Provider. More...
 
class  AuthV4MaintenanceInfo
 Server Maintenance and Update status display information title : Title
message : Contents
button : Text on the button ex) OK
action : Actions to be taken when the button is pressed
url : URL to be browsed when action is OPEN_URL
remainingTime : When action is EXIT, the time in seconds remaining until the maintenance completes. More...
 

Typedefs

typedef std::function< void(ResultAPI const &result, bool isAutoSignIn, std::string did, std::vector< ProviderType > const &providerTypeList)> AuthV4::onSetup
 AuthV4 initialization result callback. More...
 
typedef std::function< void(ResultAPI const &result, PlayerInfo const &playerInfo)> AuthV4::onSignIn
 AuthV4 Sign-in result callback. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onSignOut
 AuthV4 Sign out result callback. More...
 
typedef std::function< void(ResultAPI const &result, PlayerInfo const &conflictPlayer)> AuthV4::onConnect
 AuthV4 Provider connect result callback. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onDisconnect
 AuthV4 Provider disconnect result callback It pass the disconnect status to the authentication server and then logout the requested provider. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onShowTerms
 AuthV4 Terms of Service UI request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onAdultConfirm
 AuthV4 Adult authentication request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result, ProviderInfo const &providerInfo)> AuthV4::onCheckProvider
 AuthV4 Provider status request result callback If the requested provider is not logged in, it tries to login. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< AuthV4MaintenanceInfo > const &maintenanceInfolist)> AuthV4::onMaintenance
 AuthV4 Sever maintenance check request result callback Check whether the server is in the server maintenance with the ServerId set in Configuration. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< ProfileInfo > const &profileInfoList)> AuthV4::onGetProfile
 AuthV4 Profile information request result callback The profile information of the playerIds which are requested to the profile server is returned. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onShowProfile
 AuthV4 Profile UI request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onShowInquiry
 AuthV4 1:1 Inquiry UI request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onShowChatbotInquiry
 AuthV4 Chatbot 1:1 Inquiry UI request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onShowMyInquiry
 AuthV4 My Inquiry UI request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result, ProviderType providerType, std::map< std::string, PlayerID > providerUserIdList)> AuthV4::onGetProviderFriendsList
 HIVE SDK Provider friend list request result callback. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onResolveConflict
 Result callback of resolveConflict(HIVEAuthV4ResolveConflictHandler) call AuthV4.resolveConflict() use it. More...
 
typedef std::function< void(ResultAPI const &result)> AuthV4::onShowDeviceManagement
 AuthV4 DeviceManagement UI request result callback Invoked when the UI window is closed. More...
 
typedef std::function< void(ResultAPI const &result, std::string loginToken)> AuthV4::onGetHiveTalkPlusLoginToken
 getHiveTalkPlusLoginToken(AuthV4GetHiveTalkPlusLoginTokenListener) call AuthV4.getHiveTalkPlusLoginToken() use it. More...
 

Enumerations

enum class  ProviderType
 Provider Types AUTO is for Automatic Login
If the result of isAutoSignIn() call is true, You need to set parameter as AUTO when you call SignIn. More...
 
enum class  AuthV4MaintenanceActionType
 Actions to be taken when a button is pressed on the maintenance popup. More...
 

Functions

static void AuthV4::setup (onSetup setupListener)
 AuthV4 Perform initialization. More...
 
static void AuthV4::signIn (ProviderType providerType, onSignIn signInListener)
 Requests signIn according to the given providerType. More...
 
static void AuthV4::signInWithAuthKey (std::string authKey, onSignIn signInListener)
 Requests signIn with authKey gained from customized provider login implementation. More...
 
static void AuthV4::signOut (onSignOut signOutListener)
 it remove the local session. More...
 
static void AuthV4::playerDelete (onSignOut playerDeleteListener)
 Delete the account and remove the local session. More...
 
static void AuthV4::connect (ProviderType providerType, onConnect connectListener)
 It connects to the currently requested provider for the currently signed-in user. More...
 
static void AuthV4::disconnect (ProviderType providerType, onDisconnect disconnectListener)
 Releases the currently signed-in user from the requested provider. More...
 
static void AuthV4::connectWithAuthKey (std::string authKey, onConnect connectListener)
 Requests connect with authKey gained from customized provider login implementation. More...
 
static void AuthV4::disconnectWithName (std::string providerName, onDisconnect disconnectListener)
 Releases the currently signed-in user from the requested custom provider. More...
 
static void AuthV4::selectConflict (PlayerID selectedPlayerId, onSignIn signInListener)
 When an account conflict (CONFLICT_PLAYER) occurs due to connect, it notify the selected user to the SDK. More...
 
static void AuthV4::checkProvider (ProviderType providerType, onCheckProvider checkProviderListener)
 It check the status of the requested Provider. More...
 
static void AuthV4::checkMaintenance (bool isShow, onMaintenance maintenanceListener)
 It display maintenance status and return its data. More...
 
static void AuthV4::checkBlacklist (bool isShow, onMaintenance maintenanceListener)
 it check the restriction status of the current user. More...
 
static void AuthV4::setProviderChangedListener (onCheckProvider checkProviderLisener)
 It set a handler to be notified whether the information of the linked Provider has changed. More...
 
static void AuthV4::showSignIn (onSignIn signInListener)
 It shows the UI with a list of providers that can sign-in. More...
 
static void AuthV4::showConflictSelection (IConflictViewInfo const &viewInfo, onSignIn signInListener)
 It shows UI to select user in conflict state. More...
 
static void AuthV4::showInquiry (onShowInquiry showInquiryListener)
 It shows the 1: 1 query UI. More...
 
static void AuthV4::showChatbotInquiry (std::string additionalInfo, onShowChatbotInquiry showChatbotInquiryListener)
 Show HIVE Chatbot 1:1 inquiry
More...
 
static void AuthV4::showMyInquiry (onShowMyInquiry showInquiryListener)
 It shows the 1: 1 query UI. More...
 
static void AuthV4::showTerms (onShowTerms showTermsListener)
 It shows HIVE Terms and Conditions. More...
 
static void AuthV4::showAdultConfirm (onAdultConfirm adultConfirmListener)
 It request adult authentication. More...
 
static void AuthV4::getProfile (std::vector< PlayerID > playerIdList, onGetProfile getProfileListener)
 it returns the profile information of the requested playerIds. More...
 
static void AuthV4::showProfile (PlayerID playerId, onShowProfile showProfileListener)
 It display the profile UI of the requested playerId. More...
 
static void AuthV4::reset ()
 It initialize all data used by the SDK, including authentication information. More...
 
static bool AuthV4::isAutoSignIn ()
 It returns whether signIn (AUTO) is enabled. More...
 
static PlayerInfo AuthV4::getPlayerInfo ()
 It returns information about the currently signed-in user. More...
 
static void AuthV4::getProviderFriendsList (ProviderType providerType, onGetProviderFriendsList getProviderFriendsListListener)
 It returns the playerId list information of the friends of the connected user corresponding to the input providerType. More...
 
static void AuthV4::resolveConflict (onResolveConflict resolveConflictListener)
 It resolve the account conflicts(CONFLICT_PLAYER) caused by connect () call. More...
 
static void AuthV4::requestPermissionViewData (onAuthV4RequestPermissionViewData listener)
 권한고지 팝업을 구성하기 위한 데이터를 얻습니다. More...
 
static void AuthV4::showDeviceManagement (onShowDeviceManagement showDeviceManagementListener)
 It shows the device management UI. More...
 
static void AuthV4::getHiveTalkPlusLoginToken (onGetHiveTalkPlusLoginToken getHiveTalkPlusLoginTokenListener)
 getHiveTalkPlusLoginToken(AuthV4GetHiveTalkPlusLoginTokenListener) call AuthV4.getHiveTalkPlusLoginToken() use it. 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

◆ onAdultConfirm

typedef std::function<void(ResultAPI const & result)> AuthV4::onAdultConfirm

AuthV4 Adult authentication request result callback Invoked when the UI window is closed.



Parameters
result: INVALID_SESSION can come if you do not have a sign-in because you need a sign-in.
SUCCESS, if you have successfully completed the adult authentication
See also
HIVEResultAPI

◆ onCheckProvider

typedef std::function<void(ResultAPI const & result,ProviderInfo const & providerInfo)> AuthV4::onCheckProvider

AuthV4 Provider status request result callback If the requested provider is not logged in, it tries to login.


It does not request connect with the current playerId.

Parameters
result: SUCCESS means that the query was successful and you can determine whether the requested user is a logged-in user or not by whether providerInfo has a providerUserId.
providerInfo: 실제 provider 에 로그인 되어있다면 providerUserId 가 존재한다. 그 외 providerType 만 존재.
See also
HIVEResultAPI, HIVEProviderInfo

◆ onConnect

typedef std::function<void(ResultAPI const & result,PlayerInfo const & conflictPlayer)> AuthV4::onConnect

AuthV4 Provider connect result callback.

Parameters
result:If ProviderType is not supported (INVALID_PARAM)
or if the Sign-in is in progress (IN_PROGRESS), it may fail.
If sign-in fails, an INVALID_SESSION error is returned.
An INVALID_PARAM error will occur if the provider is already connected.
In this case, you must first call disconnect for the provider and then connect again.
CONFLICT_PLAYER is returned if the provider attempting to connect is already connected to another playerId
and the conflictPlayer object returned contains the corresponding conflict user information.
conflictPlayer: If result is CONFLICT_PLAYER, it contains information about the conflicting user.
Only the information of the ProviderInfo that conflicted with playerId is included.
playerToken is empty.
See also
HIVEResultAPI, HIVEPlayerInfo

◆ onDisconnect

typedef std::function<void(ResultAPI const & result)> AuthV4::onDisconnect

AuthV4 Provider disconnect result callback It pass the disconnect status to the authentication server and then logout the requested provider.



Parameters
result: It can fail if the delivery to the authentication server fails, if the Sign-in is in progress, if it is not setup, or if it is already a disconnected Provider.
Otherwise, success.
See also
HIVEResultAPI

◆ onGetHiveTalkPlusLoginToken

typedef std::function<void(ResultAPI const & result, std::string loginToken)> AuthV4::onGetHiveTalkPlusLoginToken

getHiveTalkPlusLoginToken(AuthV4GetHiveTalkPlusLoginTokenListener) call AuthV4.getHiveTalkPlusLoginToken() use it.


Get the required login token when logging in to HiveTalkPlus.

See also
#getHiveTalkPlusLoginToken(AuthV4GetHiveTalkPlusLoginTokenListener)

◆ onGetProfile

typedef std::function<void(ResultAPI const & result,std::vector<ProfileInfo> const & profileInfoList)> AuthV4::onGetProfile

AuthV4 Profile information request result callback The profile information of the playerIds which are requested to the profile server is returned.



Parameters
result: Results for request. In case of failure, profileInfoList is empty.
profileInfoList: Profile information for requested playerIds.
Each profile has playerId, playerName, playerImageUrl.
See also
HIVEResultAPI, HIVEProfileInfo

◆ onGetProviderFriendsList

typedef std::function<void(ResultAPI const & result,ProviderType providerType,std::map<std::string,PlayerID> providerUserIdList)> AuthV4::onGetProviderFriendsList

HIVE SDK Provider friend list request result callback.

Parameters
result: Result of API.
In case of failure, providerUserIdList is empty.
providerType: The ProviderType requested when calling the API.
providerUserIdList: The requested providerUserId list.
See also
HIVEResultAPI, HIVEProviderType

◆ onMaintenance

typedef std::function<void(ResultAPI const & result,std::vector<AuthV4MaintenanceInfo> const & maintenanceInfolist)> AuthV4::onMaintenance

AuthV4 Sever maintenance check request result callback Check whether the server is in the server maintenance with the ServerId set in Configuration.


If isShow is true on request, the maintenance popup is exposed and this callback will be called after the popup is closed.

Parameters
result: If the query to the server is successful, it will be SUCCESS.
If it is SUCCESS but there is no notice of maintenance, maintenanceInfolist will be empty.
maintenanceInfolist: Maintenance popup information about the action that is exposed to the popup.
If isShow is set to false on request, you must make and expose the UI directly by your self with this information.
See also
HIVEResultAPI, HIVEAuthV4MaintenanceInfo

◆ onResolveConflict

typedef std::function<void(ResultAPI const & result)> AuthV4::onResolveConflict

Result callback of resolveConflict(HIVEAuthV4ResolveConflictHandler) call AuthV4.resolveConflict() use it.


Logging out is not possible for IdPs that can not log out of the app. ex) Apple GameCenter
Therefore, even if the actual IDP logout fails, the internal conflict information is deleted .

See also
resolveConflict:

◆ onSetup

typedef std::function<void(ResultAPI const & result,bool isAutoSignIn,std::string did,std::vector<ProviderType> const & providerTypeList )> AuthV4::onSetup

AuthV4 initialization result callback.

Parameters
result: When initial initialize is executed, it fails if it does not receive DID or Provider List. Otherwise, it is a success.
isAutoSignIn: Whether there is an old session left on local storage. If true, call SignIn (ProviderType.AUTO).
Otherwise, you can request SignIn as one of providerTypeList.
providerTypeList: A provider list that can be signed in from the current device.
And may be different depending on the current area (IP) of the device.
GUEST is included, and in some areas or environments GUEST may not be possible.
See also
HIVEResultAPI, HIVEProviderType

◆ onShowChatbotInquiry

typedef std::function<void(ResultAPI const & result)> AuthV4::onShowChatbotInquiry

AuthV4 Chatbot 1:1 Inquiry UI request result callback Invoked when the UI window is closed.



Parameters
result: NEED_INITIALIZE can occur if 'setup' has not been called. Otherwise, success.
See also
HIVEResultAPI

◆ onShowDeviceManagement

typedef std::function<void(ResultAPI const & result)> AuthV4::onShowDeviceManagement

AuthV4 DeviceManagement UI request result callback Invoked when the UI window is closed.



Parameters
result: NETWORK_FAIL can occur if network fail. Otherwise, success.
See also
HIVEResultAPI

◆ onShowInquiry

typedef std::function<void(ResultAPI const & result)> AuthV4::onShowInquiry

AuthV4 1:1 Inquiry UI request result callback Invoked when the UI window is closed.



Parameters
result: NEED_INITIALIZE can occur if 'setup' has not been called. Otherwise, success.
See also
HIVEResultAPI

◆ onShowMyInquiry

typedef std::function<void(ResultAPI const & result)> AuthV4::onShowMyInquiry

AuthV4 My Inquiry UI request result callback Invoked when the UI window is closed.



Parameters
result: NEED_INITIALIZE can occur if 'setup' has not been called. Otherwise, success.
See also
HIVEResultAPI

◆ onShowProfile

typedef std::function<void(ResultAPI const & result)> AuthV4::onShowProfile

AuthV4 Profile UI request result callback Invoked when the UI window is closed.



Parameters
result: If the entered playerId is not of the wrong type, it succeeds
See also
HIVEResultAPI

◆ onShowTerms

typedef std::function<void(ResultAPI const & result)> AuthV4::onShowTerms

AuthV4 Terms of Service UI request result callback Invoked when the UI window is closed.



Parameters
result: NEED_INITIALIZE can occur if 'setup' has not been called. Otherwise, success.
See also
HIVEResultAPI

◆ onSignIn

typedef std::function<void(ResultAPI const & result,PlayerInfo const & playerInfo)> AuthV4::onSignIn

AuthV4 Sign-in result callback.

Parameters
result: If it is not SUCCESS, you should return to the login screen again. If the session has expired or is not normal, INVALID_SESSION is returned,
or CANCELED if the user cancels the external login window.
NETWORK or TIMEOUT can be caused by delay of server response,
and for other failures are RESPONSE_FAIL.
playerInfo: If result is SUCCESS, the playerInfo contains information about the user who successfully signed in.
providerInfoData contains the information of the connected Provider. The missing Provider is not connected.
See also
HIVEResultAPI, HIVEPlayerInfo

◆ onSignOut

typedef std::function<void(ResultAPI const & result)> AuthV4::onSignOut

AuthV4 Sign out result callback.

*

Parameters
result: If setup fails (NEED_INITIALIZE) or SignIn or SignOut is in progress (IN_PROGRESS), it may fail.
그 외 성공
See also
HIVEResultAPI

Enumeration Type Documentation

◆ AuthV4MaintenanceActionType

enum class AuthV4MaintenanceActionType
strong

Actions to be taken when a button is pressed on the maintenance popup.

OPEN_URL : Open URL passed to external browser
EXIT : Exit App
DONE : Close the popup without any action

◆ ProviderType

enum class ProviderType
strong

Provider Types AUTO is for Automatic Login
If the result of isAutoSignIn() call is true, You need to set parameter as AUTO when you call SignIn.


Function Documentation

◆ checkBlacklist()

static void AuthV4::checkBlacklist ( bool  isShow,
onMaintenance  maintenanceListener 
)
static

it check the restriction status of the current user.

It is automatically checked when signIn, connect is called and shows a restriction popup,
but you can use it when you need to check in realtime in the app.

On request, the UI is exposed when isShow is true

If the result is SUCCESS but there is no restriction notification, the maintenanceInfo of the handler will be empty.
If isShow is set to false on request, the UI should be configured and exposed by game developer with the maintenanceInfo information of the handler.

Parameters
isShowWhether to use the HIVE UI
maintenanceListeneronMaintenance

◆ checkMaintenance()

static void AuthV4::checkMaintenance ( bool  isShow,
onMaintenance  maintenanceListener 
)
static

It display maintenance status and return its data.

It checks whether the server is in maintenance with the ServerId set in Configuration.

Once the SDK is initialized, you should check the status of the server maintenance and update.
Server maintenance and Update can block lower version after update of game client, or block game connection during maintenance time of game server.
HIVE provides a function to expose server maintenance or update pop-up according to the information set in the back office.

On request, a maintenance popup UI is exposed when isShow is true.

If the result is SUCCESS but there is no maintenance notification, the maintenanceInfo of the handler will be empty.
If isShow is set to false on request, the UI should be configured and exposed by game developer with the maintenanceInfo information of the handler.

Parameters
maintenanceListeneronMaintenance

◆ checkProvider()

static void AuthV4::checkProvider ( ProviderType  providerType,
onCheckProvider  checkProviderListener 
)
static

It check the status of the requested Provider.

If the requested provider is not logged in, it tries to login.
If the login succeeds, it also brings providerUserId.

It does not request connect with the current playerId.

SUCCESS means that the query was successful and should determine whether or not the user is logged in with the presence of providerUserId in providerInfo.
If you are logged in to the actual provider, there is a providerUserId. Otherwise, only providerType exists.

When using the implicit sign-in : Google Play Games, Apple Game Center etc.

Parameters
providerTypeProviderType to check status
checkProviderListeneronCheckProvider

◆ connect()

static void AuthV4::connect ( ProviderType  providerType,
onConnect  connectListener 
)
static

It connects to the currently requested provider for the currently signed-in user.

After logging in with the requested provider, if it is successful, it sends an linking request to the authentication server.
If there is a playerId already linked to the UserId of the corresponding provider, a CONFLICT_PLAYER error is returned in the result of the handler.
In this case, you should configured an UI for account selection to the user with the conflict user information of the conflictPlayer object included in the handler.
When the user makes a selection, calls selectConflict () with the selected user information.

If you do not customize the UI, you can use showConflictSelection().
In this case, when the user selects it, it can proceed to selectConflict() and receive the result of the sign-in completed.

When the linking is completed, the corresponding state should be updated on the UI of the app.

In the case of BLACKLIST, SDK will show a restriction popup and issue a BLACKLIST error.

Parameters
providerTypeProviderType to request connect.
AUTO or GUEST causes an INVALID_PARAM error.
handleronConnect

result :If ProviderType is not supported (INVALID_PARAM)
or if the Sign-in is in progress (IN_PROGRESS), it may fail.
If sign-in fails, an INVALID_SESSION error is returned.
An INVALID_PARAM error will occur if the provider is already connected.
In this case, you must first call disconnect for the provider and then connect again.
CONFLICT_PLAYER is returned if the provider attempting to connect is already connected to another playerId
and the conflictPlayer object returned contains the corresponding conflict user information.
conflictPlayer : If result is CONFLICT_PLAYER, it contains information about the conflicting user.
Only the information of the ProviderInfo that conflicted with playerId is included.
playerToken is empty.

◆ connectWithAuthKey()

static void AuthV4::connectWithAuthKey ( std::string  authKey,
onConnect  connectListener 
)
static

Requests connect with authKey gained from customized provider login implementation.

If there is a playerId already linked to the UserId of the corresponding provider, a CONFLICT_PLAYER error is returned in the result of the handler.
In this case, you should configured an UI for account selection to the user with the conflict user information of the conflictPlayer object included in the handler.

When the user makes a selection, calls selectConflict () with the selected user information.

Parameters
authKeyauthKey to request connect
handleronConnect

result :If ProviderType is not supported (INVALID_PARAM)
or if the Sign-in is in progress (IN_PROGRESS), it may fail.
If sign-in fails, an INVALID_SESSION error is returned.
An INVALID_PARAM error will occur if the provider is already connected.
In this case, you must first call disconnect for the provider and then connect again.
CONFLICT_PLAYER is returned if the provider attempting to connect is already connected to another playerId
and the conflictPlayer object returned contains the corresponding conflict user information.
conflictPlayer : If result is CONFLICT_PLAYER, it contains information about the conflicting user.
Only the information of the ProviderInfo that conflicted with playerId is included.
playerToken is empty.

◆ disconnect()

static void AuthV4::disconnect ( ProviderType  providerType,
onDisconnect  disconnectListener 
)
static

Releases the currently signed-in user from the requested provider.

It pass the disconnect status to the authentication server and then logout the requested provider.
If delivery fails to the authentication server, if the Sign or setup is in progress,
or if the provider is already disconnected, it may fail.

Note that if all account link are disconnected due to 'disconnect', it may become a guest state.

Parameters
providerTypedisconnect 요청할 ProviderType.
disconnectListeneronDisconnect result : If delivery fails to the authentication server, if the Sign or setup is in progress,
or if the provider is already disconnected, it may fail.
Otherwise, success.

◆ disconnectWithName()

static void AuthV4::disconnectWithName ( std::string  providerName,
onDisconnect  disconnectListener 
)
static

Releases the currently signed-in user from the requested custom provider.

It pass the disconnect status to the authentication server and then logout the requested provider.
If delivery fails to the authentication server, if the Sign or setup is in progress,
or if the provider is already disconnected, it may fail.

Note that if all account link are disconnected due to 'disconnect', it may become a guest state.

Parameters
ProviderNameProviderName to request disconnect.
disconnectListeneronDisconnect result : If delivery fails to the authentication server, if the Sign or setup is in progress,
or if the provider is already disconnected, it may fail.
Otherwise, success.

◆ getHiveTalkPlusLoginToken()

static void AuthV4::getHiveTalkPlusLoginToken ( onGetHiveTalkPlusLoginToken  getHiveTalkPlusLoginTokenListener)
static

getHiveTalkPlusLoginToken(AuthV4GetHiveTalkPlusLoginTokenListener) call AuthV4.getHiveTalkPlusLoginToken() use it.


Get the required login token when logging in to HiveTalkPlus.

See also
#getHiveTalkPlusLoginToken(AuthV4GetHiveTalkPlusLoginTokenListener)

◆ getPlayerInfo()

static PlayerInfo AuthV4::getPlayerInfo ( )
static

It returns information about the currently signed-in user.

PlayerInfo includes playerToken and profile information (playerName, playerImageUrl),
but it returns the locally cached profile information instead of requesting it to the server in real time upon request.

When getProfile or showProfile is called, it is automatically updated profile information if a signed-in user is it self.

Returns
PlayerInfo Information about the currently signed-in user. Null if not signed-in.

◆ getProfile()

static void AuthV4::getProfile ( std::vector< PlayerID >  playerIdList,
onGetProfile  getProfileListener 
)
static

it returns the profile information of the requested playerIds.

It update playerName and playerImageUrl when the playerId list contains the signed-in oneself.

Parameters
playerIdListArrayList<Long>
getProfileListeneronGetProfile

◆ getProviderFriendsList()

static void AuthV4::getProviderFriendsList ( ProviderType  providerType,
onGetProviderFriendsList  getProviderFriendsListListener 
)
static

It returns the playerId list information of the friends of the connected user corresponding to the input providerType.

It comes with a pair of information about the providerId of the requested providerType and the playerId of the associated user.
Up to 5000 people for kHIVEProviderTypeFACEBOOK.

You can query your friend's PlayerInfo using getProfile.

@

Parameters
getProviderFriendsListListeneronGetProviderFriendsList

◆ isAutoSignIn()

static bool AuthV4::isAutoSignIn ( )
static

It returns whether signIn (AUTO) is enabled.

It is the same value that you would get when you called setup(),
and it only checks for existing sessions that are stored locally, so you do not know if the session token is a valid token that the session has not been expired.
If true, then signIn (AUTO) should be called through UI such as 'TOUCH TO START',
and if signIn(AUTO) fails, it should return to the initial sign-in screen again.

If it is false, you can customize the UI through the providerList provided at setup() call
or use the UI provided by HIVE via showSignIn()

If you return to the sign-in scene such as signOut in the middle of your app, you can check whether you need to configure the UI through this API.

Returns
boolean Whether signIn (AUTO) is enabled.

◆ playerDelete()

static void AuthV4::playerDelete ( onSignOut  playerDeleteListener)
static

Delete the account and remove the local session.

Request to the server to delete the account and disconnected all providers. If success, all logged in providers are logged out, the local session is removed, and a success callback is given. IN_PROGRESS may occur when signIn / Out is in progress

Parameters
playerDeleteListeneronAuthV4SignOut Delete account result callback

◆ requestPermissionViewData()

static void AuthV4::requestPermissionViewData ( onAuthV4RequestPermissionViewData  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 AuthV4::reset ( )
static

It initialize all data used by the SDK, including authentication information.

It is used for HIVE SDK implementation and testing.

◆ resolveConflict()

static void AuthV4::resolveConflict ( onResolveConflict  resolveConflictListener)
static

It resolve the account conflicts(CONFLICT_PLAYER) caused by connect () call.

This is used when the customized UI is used in the account conflict state caused by connect() call.
It resolve the account conflicts(CONFLICT_PLAYER).
Upon calling, the corresponding IdP (Provider) is logged out.
For an Apple GameCenter (IDP) that can not log out of the app, you can not sign out,
and only delete internal conflict information.

Parameters
handlerHIVEAuthV4ResolveConflictHandler
Even if the actual IdP logout fails, the internal conflict information is deleted.
See also
AuthV4.HIVEAuthV4ResolveConflictHandler

◆ selectConflict()

static void AuthV4::selectConflict ( PlayerID  selectedPlayerId,
onSignIn  signInListener 
)
static

When an account conflict (CONFLICT_PLAYER) occurs due to connect, it notify the selected user to the SDK.

If you use your own customized UI for an account conflict situation (CONFLICT_PLAYER),
you need to call it to notify the selected user when user select one.
INVALID_PARAM can occur if the SDK state is not in a conflict state, signIn is in progress, or the wrong playerId.
Even if a conflict occurs, the existing user is considered to be signIn until selectConflict () is called then sign in.

You do not need to call it if you use showConflictSelection().

Parameters
selectedPlayerIdPlayerId of the selected user
signInListeneronSignIn
Note: The existing user is a signined user, until SUCCESS.

◆ setProviderChangedListener()

static void AuthV4::setProviderChangedListener ( onCheckProvider  checkProviderLisener)
static

It set a handler to be notified whether the information of the linked Provider has changed.

For Google Play Games and Apple Game Center, account information may be changed outside of the app.
That's why it checks to see if the user information has changed when the app resumes (onStart),
and if so, the callback is called.

Callbacks will work after checkProvider() or attempting to connect directly with connect().

If you implement implicit sign-in, you need to check directly with checkProvider () at the completion of signIn().

Parameters
checkProviderLiseneronCheckProvider

◆ setup()

static void AuthV4::setup ( onSetup  setupListener)
static

AuthV4 Perform initialization.

It should be called first among all the APIs except for the configuration area,
and if this is not called first, some API may cause a NEED_INITIALIZE error.
On Android, the permission request UI is exposed
Afterwards, consent to the Terms, download check, DID setting, config.xml setting, ProviderList setting and etc. are performed.
If the DID is not received on the first execution, or the provider list is not received, the result is sent to the handler as failure.
You need to configure the UI for signIn using the providerTypeList contained in handler.
If you do not implement the UI directly, use showSignIn().

When the setup of AuthV4 is called, the functions of the existing Auth and Social areas are disabled.
In the opposite case, when Auth is initialized, AuthV4 and Provider areas are disabled.
Required VID for other functional units (Push, Pomotion, IAP, etc.), you need to insert the playerId instead,if you set up with AuthV4.

Parameters
setupListeneronSetup AuthV4 Setup request result callback
result : If the DID is not received or the provider list is not received, it fails. Otherwise, success.
isAutoSignIn : Whether an old session remains local storage. If true, call SignIn (ProviderType.AUTO).
Otherwise, you can request SignIn as one of providerTypeList.
providerTypeList : A provider list that can be signed in at the current device.
And may be different depending on the current area (IP) of the device.
GUEST is included, and in some areas or environments GUEST may not be possible.

◆ showAdultConfirm()

static void AuthV4::showAdultConfirm ( onAdultConfirm  adultConfirmListener)
static

It request adult authentication.

For some games that require adult authentication, it provide adult authentication.

Parameters
adultConfirmListeneronAdultConfirm
result : INVALID_SESSION can be given if it is not signed-in because it requires a sign-in.
SUCCESS will be made if the adult is successfully certified.

◆ showChatbotInquiry()

static void AuthV4::showChatbotInquiry ( std::string  additionalInfo,
onShowChatbotInquiry  showChatbotInquiryListener 
)
static

Show HIVE Chatbot 1:1 inquiry

Parameters
additionalInfoPromised String data (JSON format) when you call chatbot page open API
handlerAPI call result handler

◆ showConflictSelection()

static void AuthV4::showConflictSelection ( IConflictViewInfo const &  viewInfo,
onSignIn  signInListener 
)
static

It shows UI to select user in conflict state.

If a CONFLICT_PLAYER error occurs during connect() call, it shows the UI to display a user-selectable UI.
It should be called with information (nickname, level, etc.) that identifies the user corresponding to the conflicted playerId.
You should put the playerId in the "player_id" key in playerData.
For other information, add a value of type Map <String, Object> to the "game_data" key.
The keys name, "player_id" and "game_data" are required and should not be changed.

ex) {"player_id":123, "game_data":{"Name":"CurrentPlayer", "Level":52}}

If a conflicted user is selected, the game data corresponding to the user must be reloaded.

Parameters
signInListeneronSignIn

◆ showDeviceManagement()

static void AuthV4::showDeviceManagement ( onShowDeviceManagement  showDeviceManagementListener)
static

It shows the device management UI.

If unsigned account, the device management service subscription UI appears.

Parameters
showDeviceManagementListeneronShowDeviceManagement

◆ showInquiry()

static void AuthV4::showInquiry ( onShowInquiry  showInquiryListener)
static

It shows the 1: 1 query UI.

It can be used regardless of whether HIVE Membership is linked or not,
If it is linked, the e-mail part is automatically filled in.

Parameters
showInquiryListeneronShowInquiry

◆ showMyInquiry()

static void AuthV4::showMyInquiry ( onShowMyInquiry  showInquiryListener)
static

It shows the 1: 1 query UI.

It can be used only when Hive is linked.

Parameters
showInquiryListeneronShowInquiry

◆ showProfile()

static void AuthV4::showProfile ( PlayerID  playerId,
onShowProfile  showProfileListener 
)
static

It display the profile UI of the requested playerId.

If the playerId is a sign-in user's one and the user is a member of HIVE Membership, the user can change the profile picture and nickname in this UI.
In this case, when the window is closed, the playerName and playerImageUrl are synchronized with the local information.

Parameters
playerIdPlayerId to show the profile UI
showProfileListeneronShowProfile

◆ showSignIn()

static void AuthV4::showSignIn ( onSignIn  signInListener)
static

It shows the UI with a list of providers that can sign-in.

It will show a UI with the same list of providers as the ProviderList you received from setup() call.
A GUEST button may not be exposed due to network delays.
AUTO is not supported. If isAutoSignIn () is true, call signIn(AUTO) immediately.

Parameters
signInListeneronSignIn

◆ showTerms()

static void AuthV4::showTerms ( onShowTerms  showTermsListener)
static

It shows HIVE Terms and Conditions.

It shows Terms and Conditions
At initialization of the SDK, the user will go through the agreement process.
After this, the game should be configured to expose the WebView os that user can check Privacy policy and Terms and Conditions in the game setting menu.

Parameters
showTermsListeneronShowTerms
API callback

◆ signIn()

static void AuthV4::signIn ( ProviderType  providerType,
onSignIn  signInListener 
)
static

Requests signIn according to the given providerType.

If there is a locally stored session and it is not AUTO
or if there is no session stored locally and it is AUTO, it will cause INVALID_PARAM error.
You can also check whether it is AUTO or not with isAutoSignIn ().
IN_PROGRESS occurs when the sign-in is already in progress,
and the external authentication window can be exposed once again for ProviderType other than GUEST.

If signIn succeeds, you can get the user information through the playerInfo contained in the handler
and display the status of the linked provider in the UI

In the case of signIn (AUTO), since it is sign-in only with the session of the stored playerId,
you should call checkProvider () to check whether the provider performing the implicit login is also logged in the actual terminal and to synchronize the account.
If it is different, you can call signOut () and call signIn (Provider) to switch the account.

In the case of BLACKLIST, SDK will pop up a restriction popup and issue a BLACKLIST error.

Parameters
providerTypeProviderType to request signIn
signInListeneronSignIn AuthV4 signIn result callback

◆ signInWithAuthKey()

static void AuthV4::signInWithAuthKey ( std::string  authKey,
onSignIn  signInListener 
)
static

Requests signIn with authKey gained from customized provider login implementation.


If signIn succeeds, you can get the user information through the playerInfo contained in the handler

Parameters
signInListeneronSignIn AuthV4 signIn result callback

◆ signOut()

static void AuthV4::signOut ( onSignOut  signOutListener)
static

it remove the local session.

It logs out all the providers that are logged in, removes the local session and gives a success callback regardless of the result.
IN_PROGRESS may occur when signIn / Out is in progress

Note that in the case of a player in the guest state (no connected Provider), the player will not be able to sign in again.

Parameters
signOutListeneronSignOut Sign-out result callback
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy