NMALocalData

@objc
public protocol NMALocalData

A protocol that provides information about the information that is stored locally in the SDK. This includes authenticator and device information. The protocol also allows to delete the data locally.

  • Convenience method that returns all the registered accounts.

    Note

    Providing Array instead of Set to be aligned with the Swift API.

    Note

    The NMAAccounts in the provided Array are unique.

    Declaration

    Swift

    var accounts: [NMAAccount] { get }
  • Returns information about the authenticators. This information can be used for instance to know whether there is a registered authenticator or not, and thus if the user must register an authenticator or if authentication is possible.

    Note

    Providing Array instead of Set to be aligned with the Swift API.

    Note

    The NMAAuthenticators in the provided Array are unique.

    Declaration

    Swift

    var authenticators: [NMAAuthenticator] { get }
  • Returns information about the configured NMADeviceInformation (if any).

    Declaration

    Swift

    var deviceInformation: NMADeviceInformation? { get }
  • Deletes all the data managed by the SDK regarding the provided authenticator. If the authenticator is registered, it will delete the associated FIDO UAF credentials of the provided user. If the authenticator is managed by the SDK (PIN authenticator), and the specified user is the only registered user, it will also delete the PIN definition (i.e. the authenticator will no longer be enrolled).

    Note

    This method will only delete data locally. The FIDO UAF credentials will not be deleted from the server. This method should only be used when going through the protocol to delete authenticator information is not possible. For instance when the PIN authenticator is locked, which may be due to a security attack, and then it is desirable to delete the credentials locally. Using the NMADeregistration operation is the recommended way of deleting the FIDO UAF credentials.

    Note

    If no AAID is provided then all authenticators will be deleted.

    Warning

    This method must not be called on DispatchQueue.main thread.

    Declaration

    Swift

    func deleteAuthenticator(username: String, aaid: String?) -> NMADeleteAuthenticatorError?

    Parameters

    username

    the username whose data must be deleted.

    aaid

    the AAID of the NMAAuthenticator whose data must be deleted.

    Return Value

    NMADeleteAuthenticatorError with error type InvalidAaid if the provided AAID is not known. NMADeleteAuthenticatorError with error type Unknown if an error occurred during deleting the associated FIDO UAF credentials. Returns nil otherwise.