HIVE SDK for C++

HIVE_Auth.h
Go to the documentation of this file.
1
45#ifndef __HIVE_AUTH_H__
46#define __HIVE_AUTH_H__
47
48
49#include "HIVE_ResultAPI.h"
50#include "HIVE_PermissionView.h"
51
52
53NS_HIVE_BEGIN
54
55
56enum class LoginType;
58enum class EngagementEventType;
59
60
61class Account;
62class AuthInitResult;
64
65
100class HIVESDK_DLLEXPORT Auth
101{
102public:
103
104
105
120 typedef std::function<void(ResultAPI const & result, AuthInitResult const & authInitResult)> onAuthInitialize;
121
122
141 typedef std::function<void(ResultAPI const & result, LoginType loginType, Account const & currentAccount, Account const & usedAccount)> onAuthLogin;
142
143
156 typedef std::function<void(ResultAPI const & result)> onAuthLogout;
157
158
171 typedef std::function<void(ResultAPI const & result)> onAuthShowTerms;
172
173
188 typedef std::function<void(ResultAPI const & result, AuthMaintenanceInfo const & authMaintenanceInfo)> onAuthMaintenance;
189
190
203 typedef std::function<void(ResultAPI const & result)> onAuthAdultConfirm;
204
205 typedef std::function<void(ResultAPI const & result,PermissionViewData const & data)> onAuthRequestPermissionViewData;
206
207
222 static void initialize(onAuthInitialize listener);
223
224
225
239
240
259 static void login(LoginType loginType, onAuthLogin listener);
260
261
280 static void showLoginSelection(picojson::object currentData, picojson::object selectData, onAuthLogin listener);
281
282
299 static void bindLogin(std::string selectedVid, onAuthLogin listener);
300
301
318 static void logout(onAuthLogout listener);
319
320
336
353 static void showTerms(onAuthShowTerms listener);
354
355
376 static void checkMaintenance(bool isShow, onAuthMaintenance listener);
377
378
394
395
407 static void reset();
408
423 static void requestPermissionViewData(onAuthRequestPermissionViewData listener);
424
425 static bool setEmergencyMode();
426
430 static void executeEngine(picojson::value jsonParam);
431
432}; // end of Auth class
433
434
435
436
444enum class LoginType
445{
446 GUEST
447 , ACCOUNT
448 , SELECT
449 , AUTO
450
451};
452
453
454
463{
464 OPEN_URL
465 , EXIT
466 , DONE
467
468};
469
477class HIVESDK_DLLEXPORT Account {
478
479public:
480 std::string vid;
481 std::string uid;
482 std::string did;
483 std::string accessToken;
484
485 Account();
486
487 Account(picojson::value jsonParam);
488
489 picojson::object toJson() const;
490
491 std::string toString() const;
492};
493
494
502class HIVESDK_DLLEXPORT AuthInitResult {
503
504public:
506
522
523 std::string did;
524
526 std::string playerName;
527 std::string playerId;
528
530
531 AuthInitResult(picojson::value jsonParam);
532
533 picojson::object toJson() const;
534
535 std::string toString() const;
536};
537
538
546class HIVESDK_DLLEXPORT AuthMaintenanceInfo {
547
548public:
549 std::string title;
550 std::string message;
551 std::string button;
553 std::string url;
555
556
558
559 AuthMaintenanceInfo(picojson::value jsonParam);
560
561 picojson::object toJson() const;
562
563 std::string toString() const;
564};
565
566
567NS_HIVE_END // namespace hive
568
569
570#endif // __HIVE_AUTH_H__
HIVE authentication user information.
Definition: HIVE_Auth.h:477
std::string did
Unique ID issued to each device.
Definition: HIVE_Auth.h:482
std::string accessToken
Shared session key issued by the HIVE authentication server to verify the validity of the HIVE login.
Definition: HIVE_Auth.h:483
std::string uid
User unique ID for HIVE Social.
Definition: HIVE_Auth.h:481
std::string vid
If you perform HIVE login, the unique ID of the user issued for each game.
Definition: HIVE_Auth.h:480
Provides HIVE SDK initialization and HIVE authentication functions The HIVE SDK performs initializat...
Definition: HIVE_Auth.h:101
static void executeEngine(picojson::value jsonParam)
Native 영역에서 호출된 요청을 처리하기 위한 플러그인의 내부 코드
Information to be delivered when the result is notified after HIVE SDK initialization.
Definition: HIVE_Auth.h:502
std::string did
Unique ID issued by HIVE authentication server in order to check the validity of HIVE login.
Definition: HIVE_Auth.h:523
std::string playerId
Google Play Game Service 사용자 계정 (Android only.)
Definition: HIVE_Auth.h:527
bool isPGSLogin
Google Play Game Service 로그인 가능 여부 (Android only.)
Definition: HIVE_Auth.h:525
std::string playerName
Google Play Game Service 사용자 프로필 명 (Android only.)
Definition: HIVE_Auth.h:526
bool isAuthorized
HIVE (account) login history (True: Has HIVE login history, false: No HIVE login history)
Definition: HIVE_Auth.h:505
LoginType loginType
HIVE Login type If GUEST, login to GUEST If ACCOUNT, DO HIVE login (based on id/password) If SELE...
Definition: HIVE_Auth.h:521
Server maintenance and update status information.
Definition: HIVE_Auth.h:546
int remainingTime
The time in seconds remaining until the maintenance completes if actionType is EXIT....
Definition: HIVE_Auth.h:554
std::string url
URL to be browsed if actionType is OPEN_URL.
Definition: HIVE_Auth.h:553
std::string button
Text for button ex) OK.
Definition: HIVE_Auth.h:551
std::string message
Message.
Definition: HIVE_Auth.h:550
AuthMaintenanceActionType actionType
Actions to be taken when the button is pressed.
Definition: HIVE_Auth.h:552
std::string title
Title.
Definition: HIVE_Auth.h:549
Definition: HIVE_ResultAPI.h:63
AuthMaintenanceActionType
Definition of actions to be taken when the button is pressed on the maintenance popup.
Definition: HIVE_Auth.h:463
LoginType
HIVE login type definition.
Definition: HIVE_Auth.h:445
static void logout(onAuthLogout listener)
Once you have completed your HIVE login, you are issued a user's unique ID, VID, and session key.
static void requestPermissionViewData(onAuthRequestPermissionViewData listener)
권한고지 팝업을 구성하기 위한 데이터를 얻습니다.
static void 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 us...
static void bindLogin(std::string selectedVid, onAuthLogin listener)
If the user selects one of the conflicting HIVE accounts, the result must be sent to the HIVE authent...
std::function< void(ResultAPI const &result)> onAuthAdultConfirm
Adult verification pop-up result.
Definition: HIVE_Auth.h:203
static void login(LoginType loginType, onAuthLogin listener)
Request HIVE login according to given login type.
std::function< void(ResultAPI const &result)> onAuthShowTerms
The result of displaying the terms and conditions.
Definition: HIVE_Auth.h:171
static void showTerms(onAuthShowTerms listener)
Display HIVE Terms and Conditions.
static void initialize(onAuthInitialize listener)
Initialize HIVE SDK If the app is launched for the first time, you will be exposed to the terms and ...
std::function< void(ResultAPI const &result, AuthInitResult const &authInitResult)> onAuthInitialize
Notify HIVE SDK initialization result listener.
Definition: HIVE_Auth.h:120
std::function< void(ResultAPI const &result, AuthMaintenanceInfo const &authMaintenanceInfo)> onAuthMaintenance
Maintenance popup result.
Definition: HIVE_Auth.h:188
static void checkMaintenance(bool isShow, onAuthMaintenance listener)
Display the maintenance status and return data.
static void reset()
Initialize all data used by the SDK, including authentication information.
std::function< void(ResultAPI const &result, LoginType loginType, Account const &currentAccount, Account const &usedAccount)> onAuthLogin
HIVE login result listener.
Definition: HIVE_Auth.h:141
static LoginType getLoginType()
After initializing the SDK, it returns the login information that can be executed according to the ex...
static Account getAccount()
Returns the authentication information of HIVE user.
std::function< void(ResultAPI const &result)> onAuthLogout
HIVE logout result listener.
Definition: HIVE_Auth.h:156
static void showAdultConfirm(onAuthAdultConfirm listener)
Request adult verification.
@ DONE
아무 처리도 하지 않음.
@ OPEN_URL
외부 부라우저로 전달된 url 을 실행
@ GUEST
HIVE 게스트 로그인
@ SELECT
계정 충돌로 인한 유저 선택이 필요한 경우
@ ACCOUNT
HIVE 로그인
@ AUTO
게스트 로그인이나 HIVE 로그인되어 있는 상태 (단말에 세션키가 남아 있는 상태)
EngagementEventType
UserEngagement 기능 타입
Definition: HIVE_Promotion.h:635
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy