Class AuthenticationParameter


  • public class AuthenticationParameter
    extends Object
    Parameter set required for user authentication (during a payment transaction)
    Since:
    2.0.0
    • Constructor Detail

      • AuthenticationParameter

        public AuthenticationParameter​(@NonNull
                                       Activity activity,
                                       @NonNull
                                       String title,
                                       @NonNull
                                       String subTitle,
                                       @NonNull
                                       String description,
                                       @NonNull
                                       String negativeBtnText,
                                       @NonNull
                                       DeviceAuthenticationCallback callback)
        Construct the authentication params object
        Parameters:
        activity - The host activity where the authentication happening
        title - The title to display on the system authentication screen
        subTitle - The sub-title to display on the system authentication screen
        description - The description displaying on the system authentication screen
        negativeBtnText - The negative button to show on system authentication screen
        callback - The callback to know the status of the authenticate
    • Method Detail

      • getActivity

        @NonNull
        public Activity getActivity()
        Retrieve the host activity of the payment transaction
        Returns:
        The payment activity
      • getTitle

        @NonNull
        public String getTitle()
        Retrieve the custom title of the authentication screen
        Returns:
        The custom title
      • getSubTitle

        @NonNull
        public String getSubTitle()
        Retrieve the custom sub-title of the authentication screen
        Returns:
        The custom sub-title
      • getDescription

        @NonNull
        public String getDescription()
        Retrieve the custom description of the authentication screen
        Returns:
        The custom description
      • getNegativeButtonText

        @NonNull
        public String getNegativeButtonText()
        Retrieve the custom negative button of the authentication screen
        Returns:
        The custom negative name
      • setVerificationMethod

        public void setVerificationMethod​(@NonNull
                                          VerificationMethod method)
        Set the expected verification method for this authentication.

        By default, the verification method is decided internally by the D1Pay. This API provides an option for the mobile app to fallback to other authentication method (example fallback to VerificationMethod.DEVICE_KEYGUARD if VerificationMethod.BIOMETRICS is not working.

        Parameters:
        method - The expected verification method
      • getVerificationMethod

        @Nullable
        public VerificationMethod getVerificationMethod()
        Retrieve the expected verification method (if there is any)
        Returns:
        The verification method