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.0Declaration
Objective-C
+ (nonnull EMOtpModule *)otpModule;Return Value
Otp Module.
-
-updateDeviceFingerprintTokenPolicyWithTokenName:oldCustomData: newDeviceFingerprintTokenPolicy: error: 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) throwsParameters
tokenNameThe token name
oldCustomDataThe 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:];
newDeviceFingerprintTokenPolicyThe 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:];
errorIf an error occurs while updating the token, upon return contains an NSError object that describes the problem. Update may fail due to:
- If the new DeviceFingerprintTokenPolicy and old policy are identical.
- If the provided ‘oldCustomData’ does not match with the one while creating the token
- If there is no token present with the specified token name.
Return Value
YES if the migration is successful else returns NO
EMOtpModule Class Reference