How to use the Usage Type in CA Strong Authentication API (Java SDK) during verify credential call?
search cancel

How to use the Usage Type in CA Strong Authentication API (Java SDK) during verify credential call?

book

Article ID: 38000

calendar_today

Updated On:

Products

CA Advanced Authentication CA Strong Authentication CA Advanced Authentication - Strong Authentication (AuthMinder / WebFort)

Issue/Introduction

How to use the Usage Type in CA Strong Authentication API (Java SDK) during verify credential call?

Environment

CA Strong Authentication Java SDK, release: 7.1.x,8.1.x,9.x

Resolution

Usage Type is used for mapping credential profile and policy in multiple credentials scenario. To configure/use this functionality follow below steps:

1. Make sure corresponding issuance profile and authentication policy is configured with same Usage Type string.

2. Now when you create and verify OTP, enter the profilename and policyname respectively. Internally these will be mapped using the Usage Type.

3. Below is the Java code reference to make calls with policy/profile.

Reference file: <sample application>/flow/ArWFCreateOTP.jsp

OTPInput otpInput = new OTPInput();

otpInput.setProfileName("YOUR_OTP_PROFILE_NAME");

CredentialInputList credInput = new CredentialInputList();

credInput.setOTPInput(otpInput);

CredentialResponse credResponse = Issuance.Cred.create(userName, orgName, credInput, addInput);

 

Reference file: <sample application>/flow/ArWFOTPAuthenticate.jsp

public static final String ADDITIONAL_INPUT_AUTH_POLICY = "AR_WF_AUTH_POLICY";

AdditionalInput addInput = new AdditionalInput();

addInput.setAdditionalInput(ADDITIONAL_INPUT_AUTH_POLICY, "YOUR_OTP_POLICY_NAME");

AuthResponse authResponse = Authentication.OTP.verifyOTP(userName, orgName, otp, tokenType, addInput);