authenticate
public final static Unit authenticate(Context context, String authCode, PingOne.PingOneAuthenticationCallback callback)
Method that will try to authenticate with given authCode String value. Upon successful completion {@link AuthenticationObject} will be returned in the onComplete() method of {@link 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 {@link AuthenticationObject} accordingly.
}
}
}
});
Parameters
context
The context of the calling application
auth Code
The authentication code String parsed from QR or manual input.
callback
{@link PingOneAuthenticationCallback} is triggered upon completion of the flow.