1using System.Runtime.CompilerServices;
4using CommunityToolkit.Mvvm.ComponentModel;
5using CommunityToolkit.Mvvm.Input;
6using Microsoft.Maui.Controls.Shapes;
24 this.PurposeInfo = purpose;
25 this.IsPasswordHidden =
true;
32 [NotifyCanExecuteChangedFor(nameof(EnterPasswordCommand))]
33 private string passwordText =
string.Empty;
40 private bool isPasswordHidden;
62 private async Task EnterPassword()
64 if (!
string.IsNullOrEmpty(this.PasswordText))
66 string Password = this.PasswordText;
68 if (await this.authenticationService.CheckPasswordAndUnblockUserAsync(Password))
70 this.TrySetResult(Password);
75 this.PasswordText =
string.Empty;
77 long PasswordAttemptCounter = await this.authenticationService.GetCurrentPasswordCounterAsync();
84 await this.authenticationService.CheckUserBlockingAsync();
93 private async Task Cancel()
99 private void TogglePasswordVisibility()
101 this.IsPasswordHidden = !this.IsPasswordHidden;
104 protected override Task OnPopAsync()
108 this.TrySetResult(
null);
115 return base.OnPopAsync();
const int FirstMaxPasswordAttempts
Maximum password enetring attempts, first interval
A set of never changing property constants and helpful values.
A strongly-typed resource class, for looking up localized strings, etc.
static string PasswordIsInvalid
Looks up a localized string similar to PIN is invalid. You have {0} remaining attempts....
static string ErrorTitle
Looks up a localized string similar to An error has occurred.
Base class that references services in the app.
static IServiceProvider Provider
The service provider for the app. This is set before the app is started, and will be used to resolve ...
static IUiService UiService
Service serializing and managing UI-related tasks.
static IPopupService PopupService
Popup service for presenting application popups.
static IReportingStringLocalizer Localizer
Localization service
Static class containing SVG Paths for symbols used in the app.
AuthenticationPurpose
Purpose for requesting the user to authenticate itself.