EMOathMobileProtector
Objective-C
@interface EMOathMobileProtector : EMMobileProtector
Swift
class EMOathMobileProtector : EMMobileProtector
A class that manages the token devices. This class could be use to do Token Device management such as creating the token through provisioning process also getting and removing it.
- - Since: 5.3
-
Singleton instance of
EMOathMobileProtectorDeclaration
Objective-C
+ (nullable instancetype)sharedInstance;Swift
class func sharedInstance() -> Self?Return Value
The singleton
EMOathMobileProtectorinstance. This method requiresEMOathMobileProtectorto be created onEMFastTrack. -
Retrieve the Set of names of existing
EMProtectorOathTokenDevicefrom the database.Declaration
Objective-C
- (nullable NSSet<NSString *> *)tokenDeviceNamesWithError: (NSError *_Nullable *_Nullable)error;Swift
func tokenDeviceNames() throws -> Set<String>Parameters
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problem.Return Value
The set of names of existing TokenDevices. Could return empty if there’s no token device in the database.
-
Retrieve the
EMProtectorOathTokenDevicewith given name.Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?) throws -> EMProtectorOathTokenDeviceParameters
tokenDeviceNameThe token device name.
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith user token ID.Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?) throws -> EMProtectorOathTokenDeviceParameters
userTokenIDThe userTokenID
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Remove
EMProtectorOathTokenDevicefrom the database with given name.Declaration
Objective-C
- (BOOL)removeTokenDeviceWithName:(nonnull NSString *)tokenDeviceName error:(NSError *_Nullable *_Nullable)error;Swift
func removeTokenDevice(name tokenDeviceName: String) throwsParameters
tokenDeviceNameThe token name.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
YESif the succeeded. OtherwiseNO -
Starts the creation of a
EMProtectorOathTokenDevicefor Time-based OTP. If there’s a token device that has the same name in the database, the provisioning process will stop and an error will be return.Declaration
Objective-C
- (void) provisionWithTokenDeviceName:(nonnull NSString *)tokenDeviceName registrationCode:(nonnull NSString *)registrationCode totpSettings:(nonnull EMProtectorTotpSettings *)totpSettings optionalParameters: (nullable void (^)(EMProvisionerOptionalParameters *_Nonnull)) optionalParameters completionHandler: (nonnull void (^)(EMProtectorOathTokenDevice *_Nullable, NSDictionary *_Nullable, NSError *_Nullable))completionHandler;Swift
func provision(tokenDeviceName: String, registrationCode: String, totpSettings: EMProtectorTotpSettings, optionalParameters: ((EMProvisionerOptionalParameters) -> Void)?) async throws -> (EMProtectorOathTokenDevice, [AnyHashable : Any])Parameters
tokenDeviceNameThe token device name.
registrationCodeThe registration code. For Protocol Version 3, minimum registration code length is 2, and maximum registration code length is 14. For Protocol Version 5, minimum registration code length is 6, and maximum registration code length is 32.
totpSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
optionalParametersThe optional parameters, - see:
EMProvisionerOptionalParameterscompletionHandlerA callback from provisioning that contains
EMProtectorOathTokenDeviceif there’s no error also a provisioning extensions that was set by the bank during enrollment process. -
Starts the creation of a
EMProtectorOathTokenDevicefor Event-based OTP. If there’s a token device that has the same name in the database, the provisioning process will stop and an error will be return.Declaration
Objective-C
- (void) provisionWithTokenDeviceName:(nonnull NSString *)tokenDeviceName registrationCode:(nonnull NSString *)registrationCode hotpSettings:(nonnull EMProtectorHotpSettings *)hotpSettings optionalParameters: (nullable void (^)(EMProvisionerOptionalParameters *_Nonnull)) optionalParameters completionHandler: (nonnull void (^)(EMProtectorOathTokenDevice *_Nullable, NSDictionary *_Nullable, NSError *_Nullable))completionHandler;Swift
func provision(tokenDeviceName: String, registrationCode: String, hotpSettings: EMProtectorHotpSettings, optionalParameters: ((EMProvisionerOptionalParameters) -> Void)?) async throws -> (EMProtectorOathTokenDevice, [AnyHashable : Any])Parameters
tokenDeviceNameThe token device name.
registrationCodeThe registration code. For Protocol Version 3, minimum registration code length is 2, and maximum registration code length is 14. For Protocol Version 5, minimum registration code length is 6, and maximum registration code length is 32.
hotpSettingsThe Event-based OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
optionalParametersThe optional parameters, - see:
EMProvisionerOptionalParameterscompletionHandlerA callback from provisioning that contains
EMProtectorOathTokenDeviceif there’s no error also a provisioning extensions that was set by the bank during enrollment process. -
Starts the creation of a
EMProtectorOathTokenDevicefor OCRA OTP. If there’s a token device that has the same name in the database, the provisioning process will stop and an error will be return.Declaration
Objective-C
- (void) provisionWithTokenDeviceName:(nonnull NSString *)tokenDeviceName registrationCode:(nonnull NSString *)registrationCode ocraSettings:(nonnull EMProtectorOcraSettings *)ocraSettings optionalParameters: (nullable void (^)(EMProvisionerOptionalParameters *_Nonnull)) optionalParameters completionHandler: (nonnull void (^)(EMProtectorOathTokenDevice *_Nullable, NSDictionary *_Nullable, NSError *_Nullable))completionHandler;Swift
func provision(tokenDeviceName: String, registrationCode: String, ocraSettings: EMProtectorOcraSettings, optionalParameters: ((EMProvisionerOptionalParameters) -> Void)?) async throws -> (EMProtectorOathTokenDevice, [AnyHashable : Any])Parameters
tokenDeviceNameThe token device name.
registrationCodeThe registration code. For Protocol Version 3, minimum registration code length is 2, and maximum registration code length is 14. For Protocol Version 5, minimum registration code length is 6, and maximum registration code length is 32.
ocraSettingsThe OCRA OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
optionalParametersThe optional parameters, - see:
EMProvisionerOptionalParameterscompletionHandlerA callback from provisioning that contains
EMProtectorOathTokenDeviceif there’s no error also a provisioning extensions that was set by the bank during enrollment process. -
Starts the creation of a
EMProtectorOathTokenDevicefor DCVV OTP. If there’s a token device that has the same name in the database, the provisioning process will stop and an error will be return.Declaration
Objective-C
- (void) provisionWithTokenDeviceName:(nonnull NSString *)tokenDeviceName registrationCode:(nonnull NSString *)registrationCode dcvvSettings:(nonnull EMProtectorDcvvSettings *)dcvvSettings optionalParameters: (nullable void (^)(EMProvisionerOptionalParameters *_Nonnull)) optionalParameters completionHandler: (nonnull void (^)(EMProtectorOathTokenDevice *_Nullable, NSDictionary *_Nullable, NSError *_Nullable))completionHandler;Swift
func provision(tokenDeviceName: String, registrationCode: String, dcvvSettings: EMProtectorDcvvSettings, optionalParameters: ((EMProvisionerOptionalParameters) -> Void)?) async throws -> (EMProtectorOathTokenDevice, [AnyHashable : Any])Parameters
tokenDeviceNameThe token device name.
registrationCodeThe registration code. For Protocol Version 3, minimum registration code length is 2, and maximum registration code length is 14. For Protocol Version 5, minimum registration code length is 6, and maximum registration code length is 32.
dcvvSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
optionalParametersThe optional parameters, - see:
EMProvisionerOptionalParameterscompletionHandlerA callback from provisioning that contains
EMProtectorOathTokenDeviceif there’s no error also a provisioning extensions that was set by the bank during enrollment process. -
Deprecated
This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:totpSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:totpSettings:error’ instead.
Store the previously used
OathSettingsinto a storage so it can be use later during otp generation. Only useful when upgrading from previous version of Mobile Protector SDK.Declaration
Objective-C
- (BOOL)persistSettingsWithTokenDeviceName:(nonnull NSString *)tokenDeviceName totpSettings:(nonnull EMProtectorTotpSettings *) totpSettings error:(NSError *_Nullable *_Nullable)error;Swift
func persistSettings(tokenDeviceName: String, totpSettings: EMProtectorTotpSettings) throwsParameters
tokenDeviceNameThe token device name.
totpSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
YESif the succeeded. OtherwiseNO -
Deprecated
This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:hotpSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:hotpSettings:error’ instead.
Store the previously used
OathSettingsinto a storage so it can be use later during otp generation. Only useful when upgrading from previous version of Mobile Protector SDK.Declaration
Objective-C
- (BOOL)persistSettingsWithTokenDeviceName:(nonnull NSString *)tokenDeviceName hotpSettings:(nonnull EMProtectorHotpSettings *) hotpSettings error:(NSError *_Nullable *_Nullable)error;Swift
func persistSettings(tokenDeviceName: String, hotpSettings: EMProtectorHotpSettings) throwsParameters
tokenDeviceNameThe token device name.
hotpSettingsThe Event-based OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
YESif the succeeded. OtherwiseNO -
Deprecated
This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:ocraSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:ocraSettings:error’ instead.
Store the previously used
OathSettingsinto a storage so it can be use later during otp generation. Only useful when upgrading from previous version of Mobile Protector SDK.Declaration
Objective-C
- (BOOL)persistSettingsWithTokenDeviceName:(nonnull NSString *)tokenDeviceName ocraSettings:(nonnull EMProtectorOcraSettings *) ocraSettings error:(NSError *_Nullable *_Nullable)error;Swift
func persistSettings(tokenDeviceName: String, ocraSettings: EMProtectorOcraSettings) throwsParameters
tokenDeviceNameThe token device name.
ocraSettingsThe OCRA OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
YESif the succeeded. OtherwiseNO -
Deprecated
This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:dcvvSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:dcvvSettings:error’ instead.
Store the previously used
OathSettingsinto a storage so it can be use later during otp generation. Only useful when upgrading from previous version of Mobile Protector SDK.Declaration
Objective-C
- (BOOL)persistSettingsWithTokenDeviceName:(nonnull NSString *)tokenDeviceName dcvvSettings:(nonnull EMProtectorDcvvSettings *) dcvvSettings error:(NSError *_Nullable *_Nullable)error;Swift
func persistSettings(tokenDeviceName: String, dcvvSettings: EMProtectorDcvvSettings) throwsParameters
tokenDeviceNameThe token device name.
dcvvSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server. This settings are persisted and will be used later by OTP generation.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
YESif the succeeded. OtherwiseNO -
Retrieve the
EMProtectorOathTokenDevicewith given name and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData dcvvSettings:(nonnull EMProtectorDcvvSettings *)dcvvSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?, dcvvSettings: EMProtectorDcvvSettings) throws -> EMProtectorOathTokenDeviceParameters
tokenDeviceNameThe token device name.
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.dcvvSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith user token ID and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData dcvvSettings:(nonnull EMProtectorDcvvSettings *)dcvvSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?, dcvvSettings: EMProtectorDcvvSettings) throws -> EMProtectorOathTokenDeviceParameters
userTokenIDThe userTokenID
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.dcvvSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith given name and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData hotpSettings:(nonnull EMProtectorHotpSettings *)hotpSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?, hotpSettings: EMProtectorHotpSettings) throws -> EMProtectorOathTokenDeviceParameters
tokenDeviceNameThe token device name.
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.hotpSettingsThe Event-based OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith user token ID and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData hotpSettings:(nonnull EMProtectorHotpSettings *)hotpSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?, hotpSettings: EMProtectorHotpSettings) throws -> EMProtectorOathTokenDeviceParameters
userTokenIDThe userTokenID
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.hotpSettingsThe Event-based OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith given name and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData totpSettings:(nonnull EMProtectorTotpSettings *)totpSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?, totpSettings: EMProtectorTotpSettings) throws -> EMProtectorOathTokenDeviceParameters
tokenDeviceNameThe token device name.
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.totpSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith user token ID and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData totpSettings:(nonnull EMProtectorTotpSettings *)totpSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?, totpSettings: EMProtectorTotpSettings) throws -> EMProtectorOathTokenDeviceParameters
userTokenIDThe userTokenID
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.totpSettingsThe Time-based OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith given name and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData ocraSettings:(nonnull EMProtectorOcraSettings *)ocraSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?, ocraSettings: EMProtectorOcraSettings) throws -> EMProtectorOathTokenDeviceParameters
tokenDeviceNameThe token device name.
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.ocraSettingsThe OCRA OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject -
Retrieve the
EMProtectorOathTokenDevicewith user token ID and settings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorOathTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData ocraSettings:(nonnull EMProtectorOcraSettings *)ocraSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?, ocraSettings: EMProtectorOcraSettings) throws -> EMProtectorOathTokenDeviceParameters
userTokenIDThe userTokenID
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.ocraSettingsThe OCRA OTP settings that should be the same as the policy on the authentication server.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problemReturn Value
The
EMProtectorOathTokenDeviceobject
EMOathMobileProtector Class Reference