Hi,
In this blog post, lets see the java code to interact is RSA Authentication agent for Passcode code validation. You can use below code to create multifactor authentication for your systems. At the same time, even if you add interface code to SMS gateway or API to send passcode to the user mobile number.
Java code:
boolean authStatus = false;
try
{
AuthSessionFactory api = AuthSessionFactory.getInstance(configfilePath);
AuthSession authSession = api.createUserSession();
int status = authSession.check(username, password);
if (status == AuthSession.ACCESS_OK){
authStatus= true;
}
catch (Exception e){
// message or error handling
}
finally{
authSession.close();
api.shutdown();
}
RSA Library required:
Authapi.jar