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)!) -> Bool

    Parameters

    authMode

    the 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)!) throws

    Parameters

    authMode

    The authentication mode to activate.

    activatedAuthInput

    The authentication input for an activated authentication mode that gives access to protected data.

    error

    If 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)!) throws

    Parameters

    authMode

    The authentication mode to be deactivated.

    error

    If 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() -> Bool

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