User registration and integration
#
OverviewThis document describes how to implement user registration and integration with the Android SDK.
#
Feature DescriptionAndroid 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
.
#
ParameterName | Value | Description |
---|---|---|
userKey | String | User 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()); }});
#
ResultResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result 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
.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error 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
.
#
ParameterName | Value | Description |
---|---|---|
userKey | String | Email 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()); }});
#
ResultResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result 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
.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error 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
#
ParameterName | Value | Description |
---|---|---|
userKey | String | Phone 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()); }});
#
ResultResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result 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
.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error code |
When failed to call API that checks duplication of register information, it returns errorCode
.
#
Requesting Email AuthenticationIt 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.
#
ParameterName | Value | Description |
---|---|---|
String | Email 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()); }});
#
DuplicateResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
seq | 0 | Register authentication seq |
rtMsg | String | Result 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
.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error code |
When failed to call API that checks duplication of register information, it returns errorCode
.
#
Verifying Email AuthenticationIt 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.
#
ParameterName | Value | Description |
---|---|---|
String | Email address to be authenticated | |
seq | Int | Authentication request seq |
authNum | String | Authentication 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()); }});
#
VerityOtpResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
result | Boolean | Check the correctness of verifying code |
token | String | Register 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
.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error code |
When failed to call API that checks duplication of register information, it returns errorCode
.
#
GCCS RegistrationAPI 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.
#
ParameterName | Value | Description |
---|---|---|
userKey | String | User key |
name | String | Name |
phoneNum | String | Phone number |
String | ||
disposeToken | String | Email 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) { ... }});
#
RegisterUserResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result message |
When API for GCCS registration is successfully called, 0
is returned for rtCode
and registration is completed.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error code |
When failed to call API for GCCS registration, errorCode
is returned.
#
User account deactivationTo 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.
#
ParameterName | Value | Description |
---|---|---|
token | String | Sign-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()); }});
#
UnRegisterClientUserResponseKey | Value | Description |
---|---|---|
rtCode | 0 | Result code |
rtMsg | String | Result message |
When the API call for user deactivation is successful, the rtCode
will be 0
.
The user account deactivation is complete then.
#
ErrorResultKey | Value | Description |
---|---|---|
errorCode | 0 | Error code |
If API call fails, the user will receive an errorCode
.