Skip to main content

User registration and integration

Overview#

This document describes how to implement user registration and integration with the Android SDK.


Feature Description#

Android SDK provides features to register and integrate user into GCCS system by using the basic information.

Duplicated Registration Information Check (User Key)#

Check if there is any duplicated user key before GCCS registration process. It requests APi by hasDuplicateUserKey() of GuardianSdk.

Parameter#

NameValueDescription
userKeyStringUser key to check duplication

Example#

// Check duplicated register informationGuardianSdk.getInstance().hasDuplicateUserKey("gccsuser", new GuardianResponseCallback<ResultResponse>() {    @Override    public void onSuccess(ResultResponse result) {        Log.i(TAG, "Result code : " + result.rtCode);    }
    @Override    public void onFailed(ErrorResult errorResult) {        Log.e(TAG, "Error code : " + errorResult.getErrorCode());    }});

ResultResponse#

KeyValueDescription
rtCode0Result code
rtMsgStringResult message

It calls the Api that checks duplication of register information. When there is no duplicated information, it returns 0 for rtCode and when duplicated information is found, it returns 2009 for rtCode.

ErrorResult#

KeyValueDescription
errorCode0Error code

When failed to call API that checks duplication of register information, it returns errorCode.


Duplicated Registration Information Check (Email)#

Check if there is any duplicated email address before GCCS registration process. It requests APi by hasDuplicateEmail() of GuardianSdk.

Parameter#

NameValueDescription
userKeyStringEmail to check duplication

Example#

// Check duplicated register informationGuardianSdk.getInstance().hasDuplicateEmail("fnsvalue@fnsvalue.co.kr", new GuardianResponseCallback<ResultResponse>() {    @Override    public void onSuccess(ResultResponse result) {        Log.i(TAG, "Result code : " + result.rtCode);    }
    @Override    public void onFailed(ErrorResult errorResult) {        Log.e(TAG, "Error code : " + errorResult.getErrorCode());    }});

ResultResponse#

KeyValueDescription
rtCode0Result code
rtMsgStringResult message

It calls the Api that checks duplication of register information. When there is no duplicated information, it returns 0 for rtCode and when duplicated information is found, it returns 2019 for rtCode.

ErrorResult#

KeyValueDescription
errorCode0Error code

When failed to call API that checks duplication of register information, it returns errorCode.


Duplicated Registration Information Check (Phone number)#

Check if there is any duplicated phone number before GCCS registration process. API is requested by hasDuplicatePhoneNumber() of GuardianSdk

Parameter#

NameValueDescription
userKeyStringPhone number to check duplication

Example#

// Check duplicated register informationGuardianSdk.getInstance().hasDuplicatePhoneNumber("821012341234", new GuardianResponseCallback<ResultResponse>() {    @Override    public void onSuccess(ResultResponse result) {        Log.i(TAG, "Result code : " + result.rtCode);    }
    @Override    public void onFailed(ErrorResult errorResult) {        Log.e(TAG, "Error code : " + errorResult.getErrorCode());    }});

ResultResponse#

KeyValueDescription
rtCode0Result code
rtMsgStringResult message

It calls the Api that checks duplication of register information. When there is no duplicated information, it returns 0 for rtCode and when duplicated information is found, it returns 2019 for rtCode.

ErrorResult#

KeyValueDescription
errorCode0Error code

When failed to call API that checks duplication of register information, it returns errorCode.


Requesting Email Authentication#

It requires email authentication for GCCS registration. API is requested through requestOtpEmail() of GuardianSdk for email authentication request. When email authentication is successfully requested, a verifying code for registration is sent to the email address.

Parameter#

NameValueDescription
emailStringEmail for verifying code

Example#

// Check duplicated register informationGuardianSdk.getInstance().requestOtpEmail("fnsvalue@fnsvalue.co.kr", new GuardianResponseCallback<RequestOtpEmailResponse>() {    @Override    public void onSuccess(RequestOtpEmailResponse result) {        Log.i(TAG, "Result code : " + result.rtCode);    }
    @Override    public void onFailed(ErrorResult errorResult) {        Log.e(TAG, "Error code : " + errorResult.getErrorCode());    }});

DuplicateResponse#

KeyValueDescription
rtCode0Result code
seq0Register authentication seq
rtMsgStringResult message

It calls the Api that checks duplication of register information. When there is no duplicated information, it returns 0 for rtCode and when duplicated information is found, it returns 2019 for rtCode.

ErrorResult#

KeyValueDescription
errorCode0Error code

When failed to call API that checks duplication of register information, it returns errorCode.


Verifying Email Authentication#

It verifies email authentication by seq which is a return value of requestOtpEmail(), a verifying code on email, and email address. API is requested through verityOtpEmail() of GuardianSdk for email authentication request. If the verifying code for registration is correct, token value for registration will be passed.

Parameter#

NameValueDescription
emailStringEmail address to be authenticated
seqIntAuthentication request seq
authNumStringAuthentication code

Example#

// Check duplicated register informationGuardianSdk.getInstance().verityOtpEmail("fnsvalue@fnsvalue.co.kr", 23, "452422", new GuardianResponseCallback<VerityOtpResponse>() {    @Override    public void onSuccess(VerityOtpResponse result) {        Log.i(TAG, "Result code : " + result.rtCode);        Log.i(TAG, "Token for registration : " + result.token);    }
    @Override    public void onFailed(ErrorResult errorResult) {        Log.e(TAG, "Error code : " + errorResult.getErrorCode());    }});

VerityOtpResponse#

KeyValueDescription
rtCode0Result code
resultBooleanCheck the correctness of verifying code
tokenStringRegister authentication token

It calls the Api that verifies email authentication. When it is a correct verifying code, it returns 0 for rtCode and true for result.

ErrorResult#

KeyValueDescription
errorCode0Error code

When failed to call API that checks duplication of register information, it returns errorCode.


GCCS Registration#

API is requested through registerUser() of GuardianSdk for GCCS registration. It requires token that was given by the API to verify email authentication including the basic information.

Parameter#

NameValueDescription
userKeyStringUser key
nameStringName
phoneNumStringPhone number
emailStringEmail
disposeTokenStringEmail authentication token

Example#

// GCCS registrationGuardianSdk.getInstance().registerUser("gccsuser","gccsname", "fnsvalue@fnsvalue.co.kr", "821014231234", "{token}" new GuardianResponseCallback<RegisterUserResponse>() {    @Override    public void onSuccess(RegisterUserResponse result) {        ...    }
    @Override    public void onFailed(ErrorResult errorResult) {        ...    }});

RegisterUserResponse#

KeyValueDescription
rtCode0Result code
rtMsgStringResult message

When API for GCCS registration is successfully called, 0 is returned for rtCode and registration is completed.

ErrorResult#

KeyValueDescription
errorCode0Error code

When failed to call API for GCCS registration, errorCode is returned.


User account deactivation#

To deactivate the account, use unRegisterUser() from GuardianSdk to call the API.
Deactivating the account means that the user won't be able to use GCCS authentication.
Furthermore, the device will be sorted out as a deactivated device at the user status.
Reactivating the user account is viable through re-registration. More in detail can be found in the Device Re-registration To deactivate a user, it requires token that was given for log-in.

Parameter#

NameValueDescription
tokenStringSign-in token

Example#

// User account deactivationGuardianSdk.getInstance().unRegisterUser("{token}", new GuardianResponseCallback<ResultResponse>() {    @Override    public void onSuccess(ResultResponse result) {        Log.i(TAG, "Result code : " + result.rtCode);    }
    @Override    public void onFailed(ErrorResult errorResult) {        Log.e(TAG, "Error code : " + errorResult.getErrorCode());    }});

UnRegisterClientUserResponse#

KeyValueDescription
rtCode0Result code
rtMsgStringResult message

When the API call for user deactivation is successful, the rtCode will be 0.
The user account deactivation is complete then.

ErrorResult#

KeyValueDescription
errorCode0Error code

If API call fails, the user will receive an errorCode.