iES bio authentication registration

This page explains bio authentication in iES.
Basically, iES bio authentication registration takes place in the same way as the authentication process.

  1. Request authentication and open the pinpad
  2. Wait until the push is received
  3. Proceed with decryption when the push is received
  4. Have the password entered
  5. Have the biometric information entered
  6. Proceed with the bio authentication registration

Bio authentication registration

Refer to the reqPush method in the MainActivity.java included in the sample app.

    private void reqPush(final String used_type, String signData) {
        String cus_id = mEtCusId.getText().toString();
        //String cert_no = mEtCertNo.getText().toString();
        String add_cus_id = mEtAddCusId.getText().toString();

        SPinManager.getInstance().reqPush(this, used_type, cus_id,  add_cus_id, signData);
    }

The signData parameter is a value added during the electronic signature process. Add the content to the electronic signature in the string format. The used_type parameter refers to the type used. To register for bio authentication, send the used_type as 8.

Used Type Code
Log In 2
Change Password 4
Deregistration 5
Push Token Update 6
Registration for Bio Authentication 8
Bio Authentication 9
Deregistration for Bio Authentication 10
public void reqPush(final Context ctx, final String used_type, final String cus_id, final String add_cus_id, final String signData) {
        OneShotPadListener<DataResponse> l = new OneShotPadListener<DataResponse>() {
            @Override
            public void onResult(DataResponse res) {
                BaseResponse.printLog(res);
                showToast(ctx, res);
                // 결과 값 반환
                if (res.code.equals(BaseResponse.CD_OK)) {
                    startPushTimeout(ctx, cus_id); // 푸시 타임아웃 시작
                    if (used_type == OneShotPadManager.USED_TYPE_BIO_AUTH) {
                        showBioAuthPinpadDialog(ctx, add_cus_id, cus_id, signData);
                    } else {
                        showAuthPinpadDialog(ctx, add_cus_id, cus_id, signData);
                    }
                } else if (res.code.equals(BaseResponse.CD_PUSH_TOKEN)) {
                    initGcm(ctx, true);
                }
            }
        };
        OneShotPadManager.getInstance().reqPushEx(ctx, used_type, cus_id, add_cus_id, l);
    }

The reqPush method in the SPinManager now requests push, displays the pinpad, and waits until the push is received.

Password change

Authentication completion check

When the push is received and input is made in the pinpad, complete the authentication using the reqAuthPinPad method in the SPinManager.

private void reqAuthPinPad(final Context ctx, String pwd, String add_cus_id, final String cus_id, final String signData) {
        OneShotPadListener<DataResponse> l = new OneShotPadListener<DataResponse>() {
            @Override
            public void onResult(final DataResponse res) {
                BaseResponse.printLog(res);
                showToast(ctx, res);
                if (res.code.equals(BaseResponse.CD_OK)) {
                    if (!OneShotPadManager.USED_TYPE_CLOSE.equals(mPushInfo.used_type)) { // 해지 요청이 아닌 경우
                        if (true/*certSign(res.cert, res.cert_pwd)*/) { // Sign..
                            Log.d(TAG, "Sign 성공!!");
                            if (OneShotPadManager.USED_TYPE_CHANGE_PWD.equals(mPushInfo.used_type)) { // 비밀번호 변경
                                try {
                                    showChangePwdPinpadDialog(ctx, new String(res.cert_pwd.getData()), cus_id, mPushInfo, res.sign, res.sign_text);
                                } catch (KSException e) {
                                    e.printStackTrace();
                                }
                            } else {
                                SpVerifyListener<SpVerifyResponse> l = new SpVerifyListener<SpVerifyResponse>() {
                                    @Override
                                    public void onResult(SpVerifyResponse sres) {
                                        if (sres.resultData.getCode().equals(BaseResponse.CD_OK)) {
                                            //검증 성공
                                            //Toast.makeText(ctx,"검증 성공",Toast.LENGTH_LONG).show();
                                            // 비밀번호 변경
                                            if (OneShotPadManager.USED_TYPE_CHANGE_PWD.equals(mPushInfo.used_type)) { // 비밀번호 변경
                                                try {
                                                    showChangePwdPinpadDialog(ctx, new String(res.cert_pwd.getData()), cus_id, mPushInfo, res.sign, res.sign_text);
                                                } catch (KSException e) {
                                                    e.printStackTrace();
                                                }
                                            } else {

                                            }
                                        }

                                        mPushInfo = null;
                                        mTempPwd = null;
                                        mTempAddCusId = null;
                                        mSignData = null;
                                        mCus_id = null;
                                    }
                                };
                                SpVerify.getInstance(ctx).reqVerify("", res.cus_id, res.sign, res.sign_text, mPushInfo.auth_token, l);
                            }

                        } else {
                            Log.e(TAG, "Sign 실패..");
                        }
                    }
                }

            }
        };
        if (mPushInfo == null) { // 푸시가 아직 도착하지 않음
            if (mIsPushTimeout) { // 푸시 타임아웃이 종료되기 전..
                showPushProgressDialog(ctx, pwd, add_cus_id, cus_id, signData);
            } else {
                Toast.makeText(ctx, "간편인증 응답 실패.", Toast.LENGTH_SHORT).show();
            }
        } else {
            OneShotPadManager.getInstance().reqAuthPinPadEx(ctx, pwd, mPushInfo, add_cus_id, cus_id, signData, l);
        }
    }

When the authentication is completed, a pop-up window is displayed to check the user’s bio authentication in the library.
When the user’s bio authentication is completed, the bio authentication registration is complete.

Previous
Next