Provides HIVE SDK initialization and HIVE authentication functions
The HIVE SDK performs initialization based on the xml configuration file.
More...
Modules | |
FHiveAuthV4Helper | |
Provides advanced features of HIVE Authentication. | |
Files | |
file | HiveAuthV4.h |
Classes | |
class | FHiveAuthV4 |
Provides HIVE SDK initialization and HIVE authentication functions The HIVE SDK performs initialization based on the xml configuration file. More... | |
class | FHiveProviderInfo |
Identity Provider (IdP) Information It contains the UserId of the associated Identity Provider. More... | |
class | FHiveProfileInfo |
User Profile Information PlayerId : User's unique ID PlayerName : The nickname of the user to be shown outside. More... | |
class | FHivePlayerInfo |
Sign-in User Information it includes user's token and DID value along with ProfileInfo. More... | |
class | FHiveAuthV4MaintenanceExtraButton |
Additional Maintenance Button Information Button : Text on the button ex) Extra Button Action : Actions to be taken when the button is pressed Url : URL to be browsed when action is OPEN_URL More... | |
class | FHiveAuthV4MaintenanceInfo |
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 CustomButton : customer Button Title CustomLink : customer Link RemainingTime : When action is EXIT, the time in seconds remaining until the maintenance completes. More... | |
Enumerations | |
enum class | EHiveProviderType |
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 | EHiveAuthV4MaintenanceActionType |
Actions to be taken when a button is pressed on the maintenance popup. More... | |
Functions | |
static void | FHiveAuthV4::Setup (const FHiveAuthV4OnSetupDelegate &Delegate) |
AuthV4 Perform initialization. More... | |
static void | FHiveAuthV4::SignIn (const EHiveProviderType &ProviderType, const FHiveAuthV4OnSignInDelegate &Delegate) |
Requests signIn according to the given providerType. More... | |
static void | FHiveAuthV4::SignInWithAuthKey (const FString &AuthKey, const FHiveAuthV4OnSignInDelegate &Delegate) |
Requests signIn with authKey gained from customized provider login implementation. More... | |
static void | FHiveAuthV4::SignOut (const FHiveAuthV4OnSignOutDelegate &Delegate) |
it remove the local session. More... | |
static void | FHiveAuthV4::PlayerDelete (const FHiveAuthV4OnSignOutDelegate &Delegate) |
Delete the account and remove the local session. More... | |
static void | FHiveAuthV4::Connect (const EHiveProviderType &ProviderType, const FHiveAuthV4OnConnectDelegate &Delegate) |
It connects to the currently requested provider for the currently signed-in user. More... | |
static void | FHiveAuthV4::Disconnect (const EHiveProviderType &ProviderType, const FHiveAuthV4OnDisconnectDelegate &Delegate) |
Releases the currently signed-in user from the requested provider. More... | |
static void | FHiveAuthV4::ConnectWithAuthKey (const FString &AuthKey, const FHiveAuthV4OnConnectDelegate &Delegate) |
Requests connect with authKey gained from customized provider login implementation. More... | |
static void | FHiveAuthV4::DisconnectWithName (const FString &ProviderName, const FHiveAuthV4OnDisconnectDelegate &Delegate) |
Releases the currently signed-in user from the requested custom provider. More... | |
static void | FHiveAuthV4::SelectConflict (int64 SelectedPlayerId, const FHiveAuthV4OnSignInDelegate &Delegate) |
When an account conflict (CONFLICT_PLAYER) occurs due to connect, it notify the selected user to the SDK. More... | |
static void | FHiveAuthV4::ShowConflictSelection (const FHiveConflictViewData &ConflictViewData, const FHiveAuthV4OnSignInDelegate &Delegate) |
It shows UI to select user in conflict state. More... | |
static void | FHiveAuthV4::CheckProvider (const EHiveProviderType &ProviderType, const FHiveAuthV4OnCheckProviderDelegate &Delegate) |
It check the status of the requested Provider. More... | |
static void | FHiveAuthV4::CheckMaintenance (bool IsShow, const FHiveAuthV4OnMaintenanceInfoDelegate &Delegate) |
It display maintenance status and return its data. More... | |
static void | FHiveAuthV4::CheckBlacklist (bool IsShow, const FHiveAuthV4OnMaintenanceInfoDelegate &Delegate) |
it check the restriction status of the current user. More... | |
static void | FHiveAuthV4::SetProviderChangedListener (const FHiveAuthV4OnCheckProviderDelegate &Delegate) |
It set a handler to be notified whether the information of the linked Provider has changed. More... | |
static void | FHiveAuthV4::ShowSignIn (const FHiveAuthV4OnSignInDelegate &Delegate) |
It shows the UI with a list of providers that can sign-in. More... | |
static void | FHiveAuthV4::ShowInquiry (const FHiveAuthV4OnShowInquiryDelegate &Delegate) |
It shows the 1: 1 query UI. More... | |
static void | FHiveAuthV4::ShowChatbotInquiry (const FString &AdditionalInfo, const FHiveAuthV4OnShowInquiryDelegate &Delegate) |
Show HIVE Chatbot 1:1 inquiry More... | |
static void | FHiveAuthV4::ShowMyInquiry (const FHiveAuthV4OnShowInquiryDelegate &Delegate) |
It shows the 1: 1 query UI. More... | |
static void | FHiveAuthV4::ShowTerms (const FHiveAuthV4OnShowTermsDelegate &Delegate) |
It shows HIVE Terms and Conditions. More... | |
static void | FHiveAuthV4::ShowAdultConfirm (const FHiveAuthV4OnAdultConfirmDelegate &Delegate) |
It request adult authentication. More... | |
static void | FHiveAuthV4::GetProfile (const TArray< int64 > PlayerIdArray, const FHiveAuthV4OnGetProfileDelegate &Delegate) |
it returns the profile information of the requested playerIds. More... | |
static void | FHiveAuthV4::ShowProfile (int64 PlayerId, const FHiveAuthV4OnShowProfileDelegate &Delegate) |
It display the profile UI of the requested playerId. More... | |
static void | FHiveAuthV4::ResetAgreement () |
Initialize data related to agreement to terms. | |
static bool | FHiveAuthV4::IsAutoSignIn () |
It returns whether signIn (AUTO) is enabled. More... | |
static TOptional< FHivePlayerInfo > | FHiveAuthV4::GetPlayerInfo () |
It returns information about the currently signed-in user. More... | |
static void | FHiveAuthV4::GetProviderFriendsList (const EHiveProviderType &ProviderType, const FHiveAuthV4OnGetProviderFriendsListDelegate &Delegate) |
It returns the playerId list information of the friends of the connected user corresponding to the input providerType. More... | |
static void | FHiveAuthV4::ResolveConflict (const FHiveAuthV4OnResolveConflictDelegate &Delegate) |
It resolve the account conflicts(CONFLICT_PLAYER) caused by connect () call. More... | |
static void | FHiveAuthV4::ShowDeviceManagement (const FHiveAuthV4OnShowDeviceManagementDelegate &Delegate) |
It shows the device management UI. More... | |
static void | FHiveAuthV4::GetHiveTalkPlusLoginToken (const FHiveAuthV4OnGetHiveTalkPlusLoginTokenDelegate &Delegate) |
Get the required login token when logging in to HiveTalkPlus. | |
static void | FHiveAuthV4::RefreshAccessToken (const FHiveAuthV4OnRefreshAccessTokenDelegate &Delegate) |
Get the required access token when logging in to Hive. | |
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.
|
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
|
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.
|
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.
IsShow | Whether to use HIVE UI |
Delegate | FHiveAuthV4OnMaintenanceInfoDelegate |
|
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.
IsShow | Whether to use HIVE UI |
Delegate | FHiveAuthV4OnMaintenanceInfoDelegate |
|
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.
ProviderType | ProviderType to check status |
Delegate | FHiveAuthV4OnCheckProviderDelegate |
|
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.
ProviderType | ProviderType to request connect. AUTO or GUEST causes an INVALID_PARAM error. |
Delegate | FHiveAuthV4OnConnectDelegate 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. |
|
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.
AuthKey | authKey to request connect |
Delegate | FHiveAuthV4OnConnectDelegate 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. |
|
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.
ProviderType | disconnect 요청할 ProviderType. |
Delegate | FHiveAuthV4OnDisconnectDelegate 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. |
|
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.
ProviderName | ProviderName to request disconnect. |
Delegate | FHiveAuthV4OnDisconnectDelegate 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. |
|
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.
|
static |
it returns the profile information of the requested playerIds.
It update playerName and playerImageUrl when the playerId list contains the signed-in oneself.
PlayerIdArray | ArrayList<Long> |
Delegate | FHiveAuthV4OnGetProfileDelegate |
|
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.
ProviderType | ProviderType to get friends list |
Delegate | FHiveAuthV4OnGetProviderFriendsListDelegate |
|
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.
|
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
Delegate | FHiveAuthV4OnSignOutDelegate Delete account result callback |
|
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.
Delegate | FHiveAuthV4OnResolveConflictDelegate Even if the actual IdP logout fails, the internal conflict information is deleted. |
|
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().
SelectedPlayerId | PlayerId of the selected user |
Delegate | FHiveAuthV4OnSignInDelegate Note: The existing user is a signined user, until SUCCESS. |
|
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().
Delegate | FHiveAuthV4OnCheckProviderDelegate |
|
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().
Delegate | FHiveAuthV4OnSetupDelegate 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. |
|
static |
It request adult authentication.
For some games that require adult authentication, it provide adult authentication.
Delegate | FHiveAuthV4OnAdultConfirmDelegate 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. |
|
static |
Show HIVE Chatbot 1:1 inquiry
AdditionalInfo | Promised String data (JSON format) when you call chatbot page open API |
Delegate | API call result handler |
|
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.
Delegate | FHiveAuthV4OnSignInDelegate |
|
static |
It shows the device management UI.
If unsigned account, the device management service subscription UI appears.
Delegate | FHiveAuthV4OnShowDeviceManagementDelegate |
|
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.
Delegate | FHiveAuthV4OnShowInquiryDelegate |
|
static |
It shows the 1: 1 query UI.
It can be used only when Hive is linked.
Delegate | FHiveAuthV4OnShowInquiryDelegate |
|
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.
PlayerId | PlayerId to show the profile UI |
Delegate | FHiveAuthV4OnShowProfileDelegate |
|
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.
Delegate | FHiveAuthV4OnSignInDelegate |
|
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.
Delegate | FHiveAuthV4OnShowTermsDelegate API callback |
|
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.
ProviderType | ProviderType to request signIn |
Delegate | FHiveAuthV4OnSignInDelegate AuthV4 signIn result callback |
|
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
Delegate | FHiveAuthV4OnSignInDelegate AuthV4 signIn result callback |
|
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.
Delegate | FHiveAuthV4OnSignOutDelegate Sign-out result callback |