ข้ามไปที่เนื้อหา

บริการยืนยันตัวตน

แพลตฟอร์ม Hive มีบริการการตรวจสอบตัวตนเพื่อให้เป็นไปตามข้อกำหนดการปฏิบัติตามของเกาหลี บริการการตรวจสอบตัวตนประกอบด้วยการตรวจสอบตัวตน การตรวจสอบผู้ใหญ่ และฟีเจอร์การยินยอมจากผู้ปกครอง และรองรับบน Android, iOS และ Windows ของ Hive SDK (ต่อไปนี้เรียกว่า SDK) เพื่อให้สามารถใช้งานได้ในทั้งเกมมือถือและเกม PC ในสภาพแวดล้อมเกมมือถือ แม้ว่าหน้าจอเกมจะแสดงในแนวนอน แต่ UI ของบริการการตรวจสอบตัวตนจะถูกจัดเตรียมในแนวตั้ง

การตรวจสอบตัวตน

การตรวจสอบตัวตนเป็นฟีเจอร์ที่อนุญาตให้มีการตรวจสอบตัวตนโดยใช้หมายเลขโทรศัพท์มือถือของผู้ใช้เพื่อลดการละเมิดในเกมหรือจำกัดผู้ใช้ในกลุ่มอายุเฉพาะ เนื่องจาก SDK สามารถเรียกใช้ API การตรวจสอบตัวตนได้โดยไม่คำนึงถึงเวลาการเข้าสู่ระบบเกม การตรวจสอบตัวตนจึงสามารถทำได้ก่อนเริ่มบริการต่างๆ เช่น การเข้าสู่ร้านค้าหรือการเข้าสู่ดันเจี้ยน ดังนั้นจึงสามารถใช้เพื่ออนุญาตให้เฉพาะผู้ใช้ที่ผ่านการตรวจสอบตัวตนแล้วเท่านั้นที่จะดำเนินการต่อในกระบวนการเกมถัดไป


เมื่อ SDK เรียก API การตรวจสอบตัวตนและการตรวจสอบตัวตนเสร็จสิ้น หมายเลขโทรศัพท์ วันเกิด และค่าแฮช DI (ข้อมูลการตรวจสอบการเข้าร่วมที่ซ้ำซ้อน) จะถูกนำมาเป็นผลลัพธ์ ในขณะนี้ ค่าแฮช DI ไม่มีความเกี่ยวข้องกับการเข้าสู่ระบบในปัจจุบันและไม่เชื่อมโยงกับ PlayerID

ตัวอย่างโค้ดสำหรับการเรียกใช้ API การตรวจสอบตัวตนมีดังนี้:

API Reference: hive.AuthV4.showIdentityVerification

using hive;

AuthV4.showIdentityVerification((ResultAPI result, Identity identity) => {    
    if (result.isSuccess()) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
});
#include "HiveAuthV4.h"

FHiveAuthV4::showIdentityVerification(FHiveAuthV4OnIdentityVerificationDelegate::CreateLambda([this](const FHiveResultAPI& Result, FHiveIdentity& identity) {
    if (Result.IsSuccess()) {
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
}));

API Reference: AuthV4::showIdentityVerification

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
using namespace std;    
using namespace hive;

AuthV4::showIdentityVerification([=](ResultAPI result, Identity identity) {    
    if (result.isSuccess()) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }   
});

API Reference: AuthV4.showIdentityVerification

import com.hive.AuthV4    
import com.hive.ResultAPI    

AuthV4.showIdentityVerification(object : AuthV4.AuthV4ShowIdentityVerificationListener {    
    override fun onAuthV4ShowIdentityVerification(result: ResultAPI, identity: Identity?) {    
        if (result.isSuccess) {    
            // API call successful
            // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
        } else {
            // NEED_INITIALIZE called before setup
            // CANCELED window closed before receiving authentication result
            // RESPONSE_FAIL abnormal response
            // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
        } 
    }    
})

API Reference: AuthV4.showIdentityVerification

import com.hive.AuthV4;    
import com.hive.ResultAPI;    

AuthV4.showIdentityVerification(result, identity -> {    
    if (result.isSuccess()) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
});

API Reference: AuthV4Interface.showIdentityVerification

import HIVEService

AuthV4Interface.showIdentityVerification() { result, identity in    
    if result.isSuccess() {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
}

API Reference: HIVEAuthV4:showIdentityVerification

#import <HIVEService/HIVEService-Swift.h>

[HIVEAuthV4 showIdentityVerification: ^(HIVEResultAPI *result, HIVEIdentity *> *identity) {    
    if ([result isSuccess]) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
}];

การตรวจสอบอายุผู้ใหญ่

เกมที่จัดประเภทว่า "ไม่เหมาะสำหรับเยาวชน" ต้องจำกัดการเข้าถึงสำหรับผู้เยาว์ที่อายุต่ำกว่า 19 ปี แพลตฟอร์ม Hive มีฟีเจอร์การตรวจสอบอายุผู้ใหญ่ที่อนุญาตให้เข้าถึงเกมได้เฉพาะหลังจากการตรวจสอบสถานะผู้ใหญ่ผ่านการยืนยันตัวตนด้วยหมายเลขโทรศัพท์มือถือ ระยะเวลาที่ใช้ได้สำหรับการตรวจสอบอายุผู้ใหญ่คือ 1 ปี หลังจากนั้นจะมีการดำเนินการตรวจสอบใหม่โดยอัตโนมัติ

ฟีเจอร์การตรวจสอบอายุผู้ใหญ่สามารถทำได้ระหว่างการเข้าสู่เกมโดยไม่ต้องใช้โค้ดแยกใน SDK หากเปิดใช้งานการตรวจสอบอายุผู้ใหญ่ในคอนโซล [การรับรองความถูกต้อง > การรับรองความถูกต้องของผู้ใหญ่ > เปิดใช้งานการตั้งค่า]

Warning

การตรวจสอบตัวตนและการยืนยันอายุผู้ใช้สามารถทำได้เฉพาะผู้ใช้ในเกาหลีใต้ที่มีหมายเลขทะเบียนผู้มีถิ่นที่อยู่หรือหมายเลขทะเบียนชาวต่างชาติและมีโทรศัพท์มือถือที่ลงทะเบียนในชื่อของตนเองเท่านั้น

การตอบสนองเมื่อการตรวจสอบผู้ใหญ่ล้มเหลว

เมื่อผู้เยาว์พยายามยืนยันตัวตนผู้ใหญ่และล้มเหลว พวกเขาจะได้รับการตอบกลับว่า ResultAPI.CANCELED(-6) และ ResultAPI.Code.AgeLimit(-1200067), "ล้มเหลวเนื่องจากข้อจำกัดด้านอายุ." บริษัทเกมสามารถใช้การตอบกลับนี้เพื่อแนะนำผู้ใช้ที่เป็นผู้เยาว์ในเกมตามที่ต้องการ

การรับค่าแฮช DI

หลังจากการตรวจสอบผู้ใหญ่เสร็จสิ้น การเรียกใช้เมธอด AuthV4.getHashedDi ใน SDK จะได้รับค่าแฮช DI ที่สามารถระบุผู้ใช้ที่ได้รับการตรวจสอบอายุแล้ว สาเหตุที่ต้องแฮช DI คือเพื่อวัตถุประสงค์ด้านความปลอดภัย และบริษัทเกมสามารถใช้ค่าแฮชนี้ได้ตามต้องการ เนื่องจากค่าแฮช DI นี้เชื่อมโยงกับ PlayerID หลังจากการเข้าสู่ระบบ ค่าแฮชนี้สามารถใช้เป็นตัวระบุสำหรับผู้ใช้ที่ได้รับการตรวจสอบอายุแล้ว

ตัวอย่างโค้ดสำหรับเรียกใช้เมธอด AuthV4.getHashedDi เพื่อรับค่าแฮช DI ที่เชื่อมโยงกับ PlayerID มีดังนี้:

API Reference: hive.AuthV4.getHashedDi

using hive;    
AuthV4.getHashedDi((ResultAPI result, String hashedDi) => {    
    if (result.isSuccess()) {    
        // API call successful 
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
    }
});
#include "HiveAuthV4.h"

FHiveAuthV4::getHashedDi(FHiveAuthV4OnHashedDiDelegate::CreateLambda([this](const FHiveResultAPI& Result, FString& hashedDi) {
    if (Result.IsSuccess()) {
        // API call successful
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
    }
}));

API Reference: AuthV4::getHashedDi

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
using namespace std;    
using namespace hive;    
AuthV4::getHashedDi([=](ResultAPI result, string hashedDi) {    
    if (result.isSuccess()) {    
        // API call successful    
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
    }   
});

API Reference: AuthV4.getHashedDi

import com.hive.AuthV4    
import com.hive.ResultAPI    

AuthV4.getHashedDi(object : AuthV4.AuthV4GetHashedDiListener {    
    override fun onAuthV4GetHashedDi(result: ResultAPI, hashedDi: String?) {    
        if (result.isSuccess) {    
            // API call successful    
        } else {
            // NEED_INITIALIZE called before setup
            // INVALID_SESSION called before signIn
            // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
        } 
    }    
})

API Reference: AuthV4.getHashedDi

import com.hive.AuthV4;    
import com.hive.ResultAPI;    

AuthV4.getHashedDi(result, hashedDi -> {    
    if (result.isSuccess()) {    
        // API call successful    
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
    }
});

เอกสาร API: AuthV4Interface.getHashedDi

import HIVEService

AuthV4Interface.getHashedDi() { result, hashedDi in    
    if result.isSuccess() {    
        // API call successful    
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
    }
}

API Reference: HIVEAuthV4:getHashedDi

#import <HIVEService/HIVEService-Swift.h>

[HIVEAuthV4 getHashedDi: ^(HIVEResultAPI *result, NSString *> *hashedDi) {    
    if ([result isSuccess]) {    
        // API call successful    
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
    }
}];

ความยินยอมจากผู้ปกครอง

ตามพระราชบัญญัติคุ้มครองเยาวชน ผู้ที่อายุต่ำกว่า 19 ปีสามารถเข้าร่วมและใช้เกมได้เฉพาะเมื่อได้รับความยินยอมจากผู้ปกครองเท่านั้น SDK มีฟังก์ชันในการขอความยินยอมจากผู้ปกครองผ่านการตรวจสอบตัวตนด้วยหมายเลขโทรศัพท์มือถือเมื่อเยาวชนเข้าร่วมเกม PC นอกจากนี้ เมื่อให้รายละเอียดการใช้งานเกมแก่ผู้ปกครอง วันเกิดของเยาวชนและที่อยู่อีเมลของผู้ปกครองจะถูกส่งไปยังแอปเกม

ในการขอข้อมูลการอนุญาตจากผู้ปกครอง คุณต้องเรียกใช้วิธีการ getParentalConsentInfo() หลังจากที่ได้ทำการอนุญาตจากผู้ปกครองแล้ว วิธีการ getParentalConsentInfo จะส่งมอบวันเกิดของผู้ใช้ (ผู้เยาว์) และที่อยู่อีเมลของผู้ปกครองที่ได้ให้ไว้ในระหว่างการอนุญาตจากผู้ปกครอง

ตัวอย่างโค้ดสำหรับการขอข้อมูลความยินยอมจากผู้ปกครองมีดังนี้:

API Reference: hive.AuthV4.getParentalConsentInfo

using hive;    

    AuthV4.ParentalConsentInfo parentalConsentInfo = AuthV4.getParentalConsentInfo();    
#include "HiveAuthV4.h"

TOptional<FHiveParentalConsentInfo> ParentalConsentInfo = FHiveAuthV4::GetParentalConsentInfo();

API Reference: AuthV4::getParentalConsentInfo

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
    using namespace std;    
    using namespace hive;    

    AuthV4::ParentalConsentInfo parentalConsentInfo = AuthV4::getParentalConsentInfo();