Package com.thalesgroup.gemalto.d1.d1pay
Class AuthenticationParameter
- java.lang.Object
-
- com.thalesgroup.gemalto.d1.d1pay.AuthenticationParameter
-
public class AuthenticationParameter extends Object
Parameter set required for user authentication (during a payment transaction).- Since:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description AuthenticationParameter(Activity activity, String title, String subTitle, String description, String negativeBtnText, DeviceAuthenticationCallback callback)
Constructs the authentication params object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Activity
getActivity()
Retrieves the host activity of the payment transaction.DeviceAuthenticationCallback
getCallback()
Retrieves the authentication callback.String
getDescription()
Retrieves the custom description of the authentication screen.String
getNegativeButtonText()
Retrieves the custom description of the negative button on the authentication screen.String
getSubTitle()
Retrieves the custom sub-title of the authentication screen.String
getTitle()
Retrieves the custom title of the authentication screen.VerificationMethod
getVerificationMethod()
Retrieves the expected verification method (if there is any).void
setVerificationMethod(VerificationMethod method)
Sets the expected verification method for this authentication.
-
-
-
Constructor Detail
-
AuthenticationParameter
public AuthenticationParameter(@NonNull Activity activity, @NonNull String title, @NonNull String subTitle, @NonNull String description, @NonNull String negativeBtnText, @NonNull DeviceAuthenticationCallback callback)
Constructs the authentication params object.- Parameters:
activity
- The host activity where the authentication occurs.title
- The title to display on the system authentication screen.subTitle
- The sub-title to display on the system authentication screen.description
- The description to display on the system authentication screen.negativeBtnText
- The negative button to show on system authentication screen.callback
- The callback to inform the user about the authentication status.
-
-
Method Detail
-
getActivity
@NonNull public Activity getActivity()
Retrieves the host activity of the payment transaction.- Returns:
- The payment activity.
-
getCallback
@NonNull public DeviceAuthenticationCallback getCallback()
Retrieves the authentication callback.- Returns:
- The authentication callback.
-
getTitle
@NonNull public String getTitle()
Retrieves the custom title of the authentication screen.- Returns:
- The custom title of the authentication screen.
-
getSubTitle
@NonNull public String getSubTitle()
Retrieves the custom sub-title of the authentication screen.- Returns:
- The custom sub-title of the authentication screen.
-
getDescription
@NonNull public String getDescription()
Retrieves the custom description of the authentication screen.- Returns:
- The custom description of the authentication screen.
-
getNegativeButtonText
@NonNull public String getNegativeButtonText()
Retrieves the custom description of the negative button on the authentication screen.- Returns:
- The custom description of the negative button.
-
setVerificationMethod
public void setVerificationMethod(@NonNull VerificationMethod method)
Sets the expected verification method for this authentication.By default, the verification method is decided internally by D1 Pay. This API provides an option for the mobile app to fallback to other authentication method. For example, fallback to
VerificationMethod.DEVICE_KEYGUARD
ifVerificationMethod.BIOMETRICS
is not working.- Parameters:
method
- The expected verification method.
-
getVerificationMethod
@Nullable public VerificationMethod getVerificationMethod()
Retrieves the expected verification method (if there is any).- Returns:
- The verification method.
-
-