EMCapMobileProtector
Objective-C
@interface EMCapMobileProtector : EMMobileProtector
Swift
class EMCapMobileProtector : 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
EMCapMobileProtectorDeclaration
Objective-C
+ (nullable instancetype)sharedInstance;Swift
class func sharedInstance() -> Self?Return Value
The singleton
EMCapMobileProtectorinstance. This method requiresEMCapMobileProtectorto be created onEMFastTrack. -
Retrieve the Set of names of existing
EMProtectorCapTokenDevicein 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
EMProtectorCapTokenDevicewith given name.Declaration
Objective-C
- (nullable EMProtectorCapTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?) throws -> EMProtectorCapTokenDeviceParameters
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
EMProtectorCapTokenDeviceobject -
Retrieve the
EMProtectorCapTokenDevicewith user token ID.Declaration
Objective-C
- (nullable EMProtectorCapTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?) throws -> EMProtectorCapTokenDeviceParameters
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
EMProtectorCapTokenDeviceobject -
Remove
EMProtectorCapTokenDevicefrom 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 new
EMProtectorCapTokenDevice. 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 capSettings:(nonnull EMProtectorCapSettings *)capSettings optionalParameters: (nullable void (^)(EMProvisionerOptionalParameters *_Nonnull)) optionalParameters completionHandler: (nonnull void (^)(EMProtectorCapTokenDevice *_Nullable, NSDictionary *_Nullable, NSError *_Nullable))completionHandler;Swift
func provision(tokenDeviceName: String, registrationCode: String, capSettings: EMProtectorCapSettings, optionalParameters: ((EMProvisionerOptionalParameters) -> Void)?) async throws -> (EMProtectorCapTokenDevice, [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
capSettingsThe OTP settings, - see:
EMFastTrackCapSettings. This settings are persisted and will be used later by OTP generation.optionalParametersThe optional parameters, - see:
EMProvisionerOptionalParameterscompletionHandlerA callback from provisioning that contains
EMProtectorCapTokenDeviceif 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:capSettings:error’ or ‘tokenDeviceWithUserTokenID:fingerprintCustomData:capSettings:error’ instead.
Store the previously used
CapSettingsinto 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 capSettings: (nonnull EMProtectorCapSettings *)capSettings error:(NSError *_Nullable *_Nullable)error;Swift
func persistSettings(tokenDeviceName: String, capSettings: EMProtectorCapSettings) throwsParameters
tokenDeviceNameThe token device name.
capSettingsThe CAP 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
EMProtectorCapTokenDevicewith given name and capSettings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorCapTokenDevice *) tokenDeviceWithName:(nonnull NSString *)tokenDeviceName fingerprintCustomData:(nullable NSData *)fingerprintCustomData capSettings:(nonnull EMProtectorCapSettings *)capSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(name tokenDeviceName: String, fingerprintCustomData: Data?, capSettings: EMProtectorCapSettings) throws -> EMProtectorCapTokenDeviceParameters
tokenDeviceNameThe token device name.
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.capSettingsThe CAP 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
EMProtectorCapTokenDeviceobject -
Retrieve the
EMProtectorCapTokenDevicewith user token ID and capSettings.Since
6.0Declaration
Objective-C
- (nullable EMProtectorCapTokenDevice *) tokenDeviceWithUserTokenID:(int)userTokenID fingerprintCustomData:(nullable NSData *)fingerprintCustomData capSettings:(nonnull EMProtectorCapSettings *)capSettings error:(NSError *_Nullable *_Nullable)error;Swift
func tokenDevice(userTokenID: Int32, fingerprintCustomData: Data?, capSettings: EMProtectorCapSettings) throws -> EMProtectorCapTokenDeviceParameters
userTokenIDThe userTokenID
fingerprintCustomDataThe fingerprint custom data. This data is mandatory if the
EMFastTrackDeviceFingerprintSource customDatais set onEMProvisionerOptionalParametersduring provisioning.capSettingsThe CAP 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
EMProtectorCapTokenDeviceobject
EMCapMobileProtector Class Reference