EMOtpModule

Objective-C


@interface EMOtpModule : NSObject

Swift

class EMOtpModule : NSObject

OtpModule class which is the entry-point for OTP features.

Since

4.0
  • Create OtpModule object.

    Since

    4.0

    Declaration

    Objective-C

    + (nonnull EMOtpModule *)otpModule;

    Return Value

    Otp Module.

  • To apply the new device fingerprint policy to the token. This API will change (add or remove) the device token policy ‘EMDeviceFingerprintTokenPolicy’ properties, such as:

    • The mode ‘failIfInvalid’
    • The custom fingerprint data
    • The fingerprint source type ‘EMDeviceFingerprintSource’

    Declaration

    Objective-C

    - (BOOL)updateDeviceFingerprintTokenPolicyWithTokenName:
                (nonnull NSString *)tokenName
                                              oldCustomData:
                                                  (NSData *_Nullable)oldCustomData
                            newDeviceFingerprintTokenPolicy:
                                (nonnull EMDeviceFingerprintTokenPolicy *)
                                    newDeviceFingerprintTokenPolicy
                                                      error:(NSError *_Nullable
                                                                 *_Nullable)error;

    Swift

    func updateDeviceFingerprintTokenPolicy(withTokenName tokenName: String, oldCustomData: Data?, newDeviceFingerprintTokenPolicy: EMDeviceFingerprintTokenPolicy) throws

    Parameters

    tokenName

    The token name

    oldCustomData

    The old custom fingerprint data (if any) NOTE: The application manages the custom fingerprint data value so that it uses the proper value while retrieving the token, for example, by calling [capTokenManager tokenWithName:fingerprintCustomData:error:];

    newDeviceFingerprintTokenPolicy

    The new device fingerprint token policy. NOTE: The application has to retrieve the token object again to update the changes, for example, by calling [capTokenManager tokenWithName:fingerprintCustomData:error:];

    error

    If an error occurs while updating the token, upon return contains an NSError object that describes the problem. Update may fail due to:

    1. If the new DeviceFingerprintTokenPolicy and old policy are identical.
    2. If the provided ‘oldCustomData’ does not match with the one while creating the token
    3. If there is no token present with the specified token name.

    Return Value

    YES if the migration is successful else returns NO