iES bio authentication deregistration

  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. Proceed with bio authentication deregistration
  6. Check if authentication is successful

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

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 10.

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 reqAuthBio(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 (res.sign != null) {
                                //SpEncKey.getInstance(this).reqSpEncKey
                                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, cus_id, mPushInfo, res.sign, res.sign_text);
                                                } catch (Exception 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 {
                                // 서명값 리턴이 없어도 비밀번호 변경 로직은 유지
                                if (OneShotPadManager.USED_TYPE_CHANGE_PWD.equals(mPushInfo.used_type)) { // 비밀번호 변경
                                    try {
                                        showChangePwdPinpadDialog(ctx, cus_id, mPushInfo, res.sign, res.sign_text);
                                    } catch (Exception e) {
                                        e.printStackTrace();
                                    }
                                } else {

                                }


                                mPushInfo = null;
                                mTempPwd = null;
                                mTempAddCusId = null;
                                mSignData = null;
                                mCus_id = null;
                            }
                        } else {
                            Log.e(TAG, "Sign 실패..");
                        }
                    }
                }

            }
        };
        if (mPushInfo == null) { // 푸시가 아직 도착하지 않음
            /* 2016.12.06 cjw mIsPushTimeout 추가
             * 기존에는 인증 핀패드가 떠서 바로 인증 시도를 하지않고,
             * 푸시 타임아웃 시간 [20초] 이 지난 후에
             * 인증을 시도하게 되면, 무한 프로그레스 다이얼로그가 발생한다..
             * 이를 방지하기 위해 타임아웃 Flag 를 추가함.
             */
            if (mIsPushTimeout) { // 푸시 타임아웃이 종료되기 전..
                showPushProgressDialog(ctx, pwd, add_cus_id, cus_id, signData);
            } else {
                Toast.makeText(ctx, "간편인증 응답 실패.", Toast.LENGTH_SHORT).show();
            }
        } else {
            OneShotPadManager.getInstance().reqAuthBioPadEx(ctx, pwd, mPushInfo, add_cus_id, cus_id, signData, l);
        }
    }
Previous
Next