EMProtectorTokenDevice

@interface EMProtectorTokenDevice : NSObject

The interface Token Device.

Since

5.3
  • Performs a change PIN on current TokenDevice with NSString Inputs.

    • EMPinRuleErrorDomain when the new PIN does not comply with the configured PIN rules.

    Declaration

    Objective-C

    - (BOOL)changePinWithOldPin:(nonnull NSString *)oldPin
                         newPin:(nonnull NSString *)newPin
                          error:(NSError *_Nullable *_Nullable)error;

    Swift

    func changePin(oldPin: String, newPin: String) throws

    Parameters

    oldPin

    Current Pin value.

    newPin

    New Pin value.

    error

    If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL. object containing the error information. Possible errors are:

    Return Value

    YES if the operation is succeeded. Otherwise NO.

  • Performs a change PIN on current TokenDevice with EMProtectorAuthInput .

    • EMPinRuleErrorDomain when the new PIN does not comply with the configured PIN rules. Throw run time exception if the wrap EMProtectorAuthInput is not from EMPinAuthInput

    Since

    6.0

    Declaration

    Objective-C

    - (BOOL)
        changePinWithOldPinAuthInput:(nonnull EMProtectorAuthInput *)oldPinAuthInput
                     newPinAuthInput:(nonnull EMProtectorAuthInput *)newPinAuthInput
                               error:(NSError *_Nullable *_Nullable)error;

    Swift

    func changePin(oldPinAuthInput: EMProtectorAuthInput, newPinAuthInput: EMProtectorAuthInput) throws

    Parameters

    oldPinAuthInput

    Current Pin value.

    newPinAuthInput

    New Pin value.

    error

    If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL. object containing the error information. Possible errors are:

    Return Value

    YES if the operation is succeeded. Otherwise NO.

  • Return a type of OTP. This value is based on the OTP settings that was configured during provisioning.

    Declaration

    Objective-C

    - (EMOtpType)otpType;

    Swift

    func otpType() -> EMOtpType

    Return Value

    EMOtpType enum value

  • Check if System Biometric mode is activated.

    Declaration

    Objective-C

    - (BOOL)isSystemBiometricModeActivated;

    Swift

    func isSystemBiometricModeActivated() -> Bool

    Return Value

    YES if Biometric mode is activated. Otherwise NO.

  • Activate System Biometric mode with PIN String.

    Declaration

    Objective-C

    - (BOOL)activateSystemBiometricModeWithPin:(nonnull NSString *)pin
                                         error:(NSError *_Nullable *_Nullable)error;

    Swift

    func activateSystemBiometricMode(pin: String) throws

    Parameters

    pin

    Current pin value.

    error

    If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in ‘NULL’.

    Return Value

    ‘YES’ if mode has been activated. Otherwise NO.

    • Activate System Biometric mode pin Auth Input. *
    • - parameter: pinAuthInput Current pin Auth Input.
    • - parameter: error If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in ‘NULL’.
    • - returns: ‘YES’ if mode has been activated. Otherwise NO.

    Since

    6.0

    Declaration

    Objective-C

    - (BOOL)activateSystemBiometricModeWithAuthInput:
                (nonnull EMProtectorAuthInput *)pinAuthInput
                                               error:(NSError *_Nullable *_Nullable)
                                                         error;

    Swift

    func activateSystemBiometricMode(pinAuthInput: EMProtectorAuthInput) throws
  • Deactivate system Biometric mode.

    Declaration

    Objective-C

    - (BOOL)deactivateSystemBiometricModeWithError:
        (NSError *_Nullable *_Nullable)error;

    Swift

    func deactivateSystemBiometricMode() throws

    Parameters

    error

    If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in ‘NULL’.

    Return Value

    ‘YES’ if mode has been deactivated. Otherwise NO.

  • Authenticate with system Biometric

    Declaration

    Objective-C

    - (void)authenticateWithMessage:(nullable NSString *)message
                      fallbackTitle:(nullable NSString *)fallbackTitle
                  completionHandler:
                      (nullable void (^)(EMProtectorAuthInput *_Nullable,
                                         NSData *_Nullable,
                                         NSError *_Nullable))completionHandler;

    Swift

    func authenticateWithMessage(localizedMessage message: String?, fallbackTitle: String?, completionHandler: ((EMProtectorAuthInput?, Data?, Error?) -> Void)? = nil)

    Parameters

    message

    the message that will be displayed on Touch ID

    fallbackTitle

    the fallback title. If set to empty string, the button will be hidden.

    completionHandler

    completion handler to be called with the result once it’s completed. Touch ID evaluatedPolicyDomainState data will be returned upon success. [error code] will contain EM_STATUS_AUTHENTICATION_CANCELED_USER_FALLBACK if user tapped the fallback button.