EMAuthenticatable
Objective-C
@protocol EMAuthenticatable <NSObject>
Swift
protocol EMAuthenticatable : NSObjectProtocol
Authenticatable protocol. Authenticatable refers to some asset which could be authenticated with multi-authentication modes once configured.
Since
3.2-
Check if a mode has already been activated for this authenticatable.
Since
3.2
Declaration
Objective-C
- (BOOL)isAuthModeActive:(id<EMAuthMode>)authMode;Swift
func isAuthModeActive(_ authMode: (any EMAuthMode)!) -> BoolParameters
authModethe authentication mode to be check.
Return Value
‘YES’ if mode is active, ‘NO’ otherwise.
-
Get the list of authentication modes that have been activated for this authenticatable.
Since
3.2
Declaration
Objective-C
- (NSSet *)activatedModes;Swift
func activatedModes() -> Set<AnyHashable>!Return Value
list of activated modes.
-
Activate an authentication mode. An active authentication input is required to access protected data. Currently, only supports using EMPinAuthMode to activate EMBioFingerprintAuthMode.
Prior to activate the mode, this method will check if it is well-configured on the platform.
Since
3.2
Declaration
Objective-C
- (BOOL)activateAuthMode:(id<EMAuthMode>)authMode usingActivatedInput:(id<EMAuthInput>)activatedAuthInput error:(NSError **)error;Swift
func activate(_ authMode: (any EMAuthMode)!, usingActivatedInput activatedAuthInput: (any EMAuthInput)!) throwsParameters
authModeThe authentication mode to activate.
activatedAuthInputThe authentication input for an activated authentication mode that gives access to protected data.
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in
NULL.Return Value
‘YES’ if mode has been activated, ‘NO’ otherwise.
-
Deactivate an authentication mode without user authentication.
Prior to deactivating the mode, this method will check if it is well-configured on the platform.
Since
3.2
Declaration
Objective-C
- (BOOL)deactivateAuthMode:(id<EMAuthMode>)authMode error:(NSError **)error;Swift
func deactivate(_ authMode: (any EMAuthMode)!) throwsParameters
authModeThe authentication mode to be deactivated.
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in
NULL.Return Value
‘YES’ if mode has been deactivated, ‘NO’ otherwise.
-
Check if multi authentication mode has been enabled. This function will return true if the authenticatable has been migrated to support multi auth modes. After migration, this function will return true even when only one mode is activated.
Since
3.2
Declaration
Objective-C
- (BOOL)isMultiAuthModeEnabled;Swift
func isMultiAuthModeEnabled() -> BoolReturn Value
if multi authentication mode has been enabled.
-
Get the UUID of an Authenticatable object.
Since
4.0
Declaration
Objective-C
- (NSString *)uuid;Swift
func uuid() -> String!Return Value
String value of UUID.
EMAuthenticatable Protocol Reference