1using System.Runtime.CompilerServices;
2using System.Security.Cryptography;
4using CommunityToolkit.Mvvm.ComponentModel;
5using CommunityToolkit.Mvvm.Input;
6using Microsoft.Maui.Controls.Shapes;
22 this.PurposeInfo = purpose;
23 this.IsPasswordHidden =
true;
30 [NotifyCanExecuteChangedFor(nameof(EnterPasswordCommand))]
31 private string passwordText =
string.Empty;
38 private bool isPasswordHidden;
60 private async Task EnterPassword()
62 if (!
string.IsNullOrEmpty(this.PasswordText))
64 string Password = this.PasswordText;
69 this.result.TrySetResult(Password);
73 this.PasswordText =
string.Empty;
75 long PasswordAttemptCounter = await
App.GetCurrentPasswordCounter();
91 private async Task Cancel()
94 this.result.TrySetResult(
null);
98 private void TogglePasswordVisibility()
100 this.IsPasswordHidden = !this.IsPasswordHidden;
The Application class, representing an instance of the Neuro-Access app.
static async Task< bool > CheckPasswordAndUnblockUser(string Password)
Check the Password and reset the blocking counters if it matches
static async Task CheckUserBlocking()
Verify if the user is blocked and show an alert
const int FirstMaxPasswordAttempts
Maximum password enetring attempts, first interval
A set of never changing property constants and helpful values.
Base class that references services in the app.
static IUiService UiService
Service serializing and managing UI-related tasks.
static IStringLocalizer Localizer
Localization service
Static class containing SVG Paths for symbols used in the app.
AuthenticationPurpose
Purpose for requesting the user to authenticate itself.