LocalAuthenticationRepositoryImpl class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sp
→ SharedPreferences
-
final
Methods
-
addFailedAttempt(DateTime timestamp, {required UserId forUser})
→ Future<void>
-
Adds
timestamp
to the list of failed authentication attempts of user with forUser
id
override
-
clearLastPausedTimestamp()
→ Future<void>
-
Clear the last paused timestamp, e.g., when the app has been successfully unlocked
override
-
disableBiometricAuthentication({required UserId userId})
→ Future<void>
-
Disables only biometric authentication, while keeping the pin.
To also disable pin authentication, use disableLocalAuthentication
override
-
disableLocalAuthentication({required UserId userId})
→ Future<void>
-
Writes to the repository the preference of the user with
userId
to not show lock screen
This includes both pin and biometric authentication
override
-
enableBiometricAuthentication({required UserId userId})
→ Future<void>
-
override
-
enablePinAuthentication({required Pin pin, required UserId userId})
→ Future<void>
-
Writes to the repository the user's preference to have local authentication enabled
with the given
pin
, for the user with userId
override
-
getListOfFailedAttempts({required UserId userId})
→ Future<List<DateTime>>
-
Gets a list of DateTime timestamps of all the previous failed authentication attempts
(i.e., times when a wrong pincode was entered)
override
-
getPausedTimestamp()
→ Future<DateTime?>
-
Get timestamp of when the app became paused to determine if sufficient time has passed for it to be locked
override
-
getPin({required UserId forUser})
→ Future<PinHash?>
-
Returns the
PinHash
of the user with forUser
id, or null
if no pin is set
override
-
isBiometricAuthenticationEnabled({required UserId userId})
→ Future<bool?>
-
User's preference of if they want to use biometric authentication
override
-
isPinAuthenticationEnabled({required UserId userId})
→ Future<bool?>
-
Used to determine if the lock screen should be shown
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
resetFailedAttempts({required UserId ofUser})
→ Future<void>
-
Clears the list of failed authentication attempts
ofUser
override
-
savePausedTimestamp(DateTime time)
→ Future<void>
-
Saves the timestamp when the app became paused (i.e., lost focus), so that the
app could be locked if the user has been away from it for longer than Authenticator.lockAfterDuration
override
-
setPin(Pin newPin, {required UserId forUser})
→ Future<void>
-
Set the
newPin
for user with forUser
id
override
-
toString()
→ String
-
A string representation of this object.
inherited