Interface LocalData
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaccounts()
Convenience method that returns all the registered accounts.Returns information about the authenticators.void
deleteAuthenticator
(String username) Deletes all the data managed by the SDK regarding the provided user.void
deleteAuthenticator
(String username, String aaid) Deletes all the data managed by the SDK regarding the provided authenticator.Returns information about the configuredDeviceInformation
(if any).
-
Method Details
-
deviceInformation
Optional<DeviceInformation> deviceInformation()Returns information about the configuredDeviceInformation
(if any).If the
DeviceInformation
is present in the returnedOptional
, then it is guaranteed theDeviceInformation.deviceId()
gives back a valid device identifier, a non-emptyString
.- Returns:
- the
DeviceInformation
-
deleteAuthenticator
Deletes all the data managed by the SDK regarding the provided user.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
Deregistration
is the recommended way of deleting the FIDO UAF credentials.Note that this method is synchronous, and requires some IO operations, so it is recommended to invoke it outside the main/UI thread.
- Parameters:
username
- the username whose data must be deleted
-
deleteAuthenticator
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
Deregistration
is the recommended way of deleting the FIDO UAF credentials.Note that this method is synchronous, and requires some IO operations, so it is recommended to invoke it outside the main/UI thread.
- Parameters:
username
- the username whose data must be deletedaaid
- the AAID of theAuthenticator
whose data must be deleted- Throws:
IllegalArgumentException
- if the provided AAID is unknown
-
authenticators
Set<Authenticator> authenticators()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 that this method is synchronous, and it can take a long time to complete, so it is recommended to invoke it outside the main/UI thread.
- Returns:
- the authenticator information
-
accounts
Convenience method that returns all the registered accounts.Note that this method is synchronous, and it can take a long time to complete, so it is recommended to invoke it outside the main/UI thread.
- Returns:
- the accounts
-