authenticate
public static void authenticate(Context context, String authCode, PingOne.PingOneAuthenticationCallback callback)
Method that will try to authenticate with given authCode String value. Upon successful completion AuthenticationObject will be returned in the onComplete() method of PingOneAuthenticationCallback.
Sample usage:
PingOne.authenticate(context, authenticationCode, new PingOneAuthenticationCallback() {
@Override
public void onComplete(@Nullable AuthenticationObject authenticationObject, @Nullable PingOneSDKError error) {
if (authenticationObject != null){
//continue the flow according to the authentication object status, for example:
if (authenticationObject.getStatus().equals("EXPIRED")){
//handle expired authentication
return;
}
if (authenticationObject.getNeedsApproval().equals("REQUIRED")){
//ask the user to approve the authentication, trigger approve/deny methods
//of the AuthenticationObject accordingly.
}
}
}
});
Content copied to clipboard
Parameters
context
The context of the calling application
auth Code
The authentication code String parsed from QR or manual input.
callback
PingOneAuthenticationCallback is triggered upon completion of the flow.