EMOathMobileProtector

@interface 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 EMOathMobileProtector

    Declaration

    Objective-C

    + (nullable instancetype)sharedInstance;

    Swift

    class func sharedInstance() -> Self?

    Return Value

    The singleton EMOathMobileProtector instance. This method requires EMOathMobileProtector to be created on EMFastTrack.

  • Retrieve the Set of names of existing EMProtectorOathTokenDevice from the database.

    Declaration

    Objective-C

    - (nullable NSSet<NSString *> *)tokenDeviceNamesWithError:
        (NSError *_Nullable *_Nullable)error;

    Swift

    func tokenDeviceNames() throws -> Set<String>

    Parameters

    error

    If an error occurs, upon return contains an NSError object 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 EMProtectorOathTokenDevice with 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 -> EMProtectorOathTokenDevice

    Parameters

    tokenDeviceName

    The token device name.

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with 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 -> EMProtectorOathTokenDevice

    Parameters

    userTokenID

    The userTokenID

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Remove EMProtectorOathTokenDevice from the database with given name.

    Declaration

    Objective-C

    - (BOOL)removeTokenDeviceWithName:(nonnull NSString *)tokenDeviceName
                                error:(NSError *_Nullable *_Nullable)error;

    Swift

    func removeTokenDevice(name tokenDeviceName: String) throws

    Parameters

    tokenDeviceName

    The token name.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    YES if the succeeded. Otherwise NO

  • Starts the creation of a EMProtectorOathTokenDevice for 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)?, completionHandler: @escaping (EMProtectorOathTokenDevice?, [AnyHashable : Any]?, Error?) -> Void)

    Parameters

    tokenDeviceName

    The token device name.

    registrationCode

    The 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.

    totpSettings

    The 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.

    optionalParameters

    The optional parameters, - see: EMProvisionerOptionalParameters

    completionHandler

    A callback from provisioning that contains EMProtectorOathTokenDevice if there’s no error also a provisioning extensions that was set by the bank during enrollment process.

  • Starts the creation of a EMProtectorOathTokenDevice for 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)?, completionHandler: @escaping (EMProtectorOathTokenDevice?, [AnyHashable : Any]?, Error?) -> Void)

    Parameters

    tokenDeviceName

    The token device name.

    registrationCode

    The 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.

    hotpSettings

    The 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.

    optionalParameters

    The optional parameters, - see: EMProvisionerOptionalParameters

    completionHandler

    A callback from provisioning that contains EMProtectorOathTokenDevice if there’s no error also a provisioning extensions that was set by the bank during enrollment process.

  • Starts the creation of a EMProtectorOathTokenDevice for 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)?, completionHandler: @escaping (EMProtectorOathTokenDevice?, [AnyHashable : Any]?, Error?) -> Void)

    Parameters

    tokenDeviceName

    The token device name.

    registrationCode

    The 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.

    ocraSettings

    The 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.

    optionalParameters

    The optional parameters, - see: EMProvisionerOptionalParameters

    completionHandler

    A callback from provisioning that contains EMProtectorOathTokenDevice if there’s no error also a provisioning extensions that was set by the bank during enrollment process.

  • Starts the creation of a EMProtectorOathTokenDevice for 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)?, completionHandler: @escaping (EMProtectorOathTokenDevice?, [AnyHashable : Any]?, Error?) -> Void)

    Parameters

    tokenDeviceName

    The token device name.

    registrationCode

    The 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.

    dcvvSettings

    The 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.

    optionalParameters

    The optional parameters, - see: EMProvisionerOptionalParameters

    completionHandler

    A callback from provisioning that contains EMProtectorOathTokenDevice if 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 OathSettings into 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) throws

    Parameters

    tokenDeviceName

    The token device name.

    totpSettings

    The 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.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    YES if the succeeded. Otherwise NO

  • Deprecated

    This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:hotpSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:hotpSettings:error’ instead.

    Store the previously used OathSettings into 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) throws

    Parameters

    tokenDeviceName

    The token device name.

    hotpSettings

    The 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.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    YES if the succeeded. Otherwise NO

  • Deprecated

    This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:ocraSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:ocraSettings:error’ instead.

    Store the previously used OathSettings into 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) throws

    Parameters

    tokenDeviceName

    The token device name.

    ocraSettings

    The 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.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    YES if the succeeded. Otherwise NO

  • Deprecated

    This API is deprecated since 6.0. Use ‘tokenDeviceWithName:fingerprintCustomData:dcvvSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:dcvvSettings:error’ instead.

    Store the previously used OathSettings into 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) throws

    Parameters

    tokenDeviceName

    The token device name.

    dcvvSettings

    The 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.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    YES if the succeeded. Otherwise NO

  • Retrieve the EMProtectorOathTokenDevice with given name and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    tokenDeviceName

    The token device name.

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    dcvvSettings

    The Time-based OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with user token ID and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    userTokenID

    The userTokenID

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    dcvvSettings

    The Time-based OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with given name and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    tokenDeviceName

    The token device name.

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    hotpSettings

    The Event-based OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with user token ID and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    userTokenID

    The userTokenID

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    hotpSettings

    The Event-based OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with given name and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    tokenDeviceName

    The token device name.

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    totpSettings

    The Time-based OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with user token ID and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    userTokenID

    The userTokenID

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    totpSettings

    The Time-based OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with given name and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    tokenDeviceName

    The token device name.

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    ocraSettings

    The OCRA OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object

  • Retrieve the EMProtectorOathTokenDevice with user token ID and settings.

    Since

    6.0

    Declaration

    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 -> EMProtectorOathTokenDevice

    Parameters

    userTokenID

    The userTokenID

    fingerprintCustomData

    The fingerprint custom data. This data is mandatory if the EMFastTrackDeviceFingerprintSource customData is set on EMProvisionerOptionalParameters during provisioning.

    ocraSettings

    The OCRA OTP settings that should be the same as the policy on the authentication server.

    error

    If an error occurs, upon return contains an NSError object that describes the problem

    Return Value

    The EMProtectorOathTokenDevice object