public override void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity) { if (!CheckAuthed()) { return; } _context.CredentialIdentity = credentialIdentity; CheckLock(() => ProvideCredential()); }
public override void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity) { InitAppIfNeeded(); if (!CheckAuthed()) { return; } _context.CredentialIdentity = credentialIdentity; CheckLock(async() => await ProvideCredentialAsync()); }
public override async void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity) { InitAppIfNeeded(); if (!await IsAuthed()) { await _accountsManager.NavigateOnAccountChangeAsync(false); return; } _context.CredentialIdentity = credentialIdentity; CheckLock(async() => await ProvideCredentialAsync()); }
public override void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity) { if (!IsAuthed() || IsLocked()) { var err = new NSError(new NSString("ASExtensionErrorDomain"), Convert.ToInt32(ASExtensionErrorCode.UserInteractionRequired), null); ExtensionContext.CancelRequest(err); return; } _context.CredentialIdentity = credentialIdentity; ProvideCredentialAsync().GetAwaiter().GetResult(); }
public override async void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity) { InitAppIfNeeded(); if (!await IsAuthed() || await IsLocked()) { var err = new NSError(new NSString("ASExtensionErrorDomain"), Convert.ToInt32(ASExtensionErrorCode.UserInteractionRequired), null); ExtensionContext.CancelRequest(err); return; } _context.CredentialIdentity = credentialIdentity; await ProvideCredentialAsync(); }
public override async void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity) { InitAppIfNeeded(); var storageService = ServiceContainer.Resolve <IStorageService>("storageService"); await storageService.SaveAsync(Bit.Core.Constants.PasswordRepromptAutofillKey, false); await storageService.SaveAsync(Bit.Core.Constants.PasswordVerifiedAutofillKey, false); if (!await IsAuthed() || await IsLocked()) { var err = new NSError(new NSString("ASExtensionErrorDomain"), Convert.ToInt32(ASExtensionErrorCode.UserInteractionRequired), null); ExtensionContext.CancelRequest(err); return; } _context.CredentialIdentity = credentialIdentity; await ProvideCredentialAsync(false); }
public override async void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity) { try { InitAppIfNeeded(); if (!await IsAuthed()) { await _accountsManager.NavigateOnAccountChangeAsync(false); return; } _context.CredentialIdentity = credentialIdentity; await CheckLockAsync(async () => await ProvideCredentialAsync()); } catch (Exception ex) { LoggerHelper.LogEvenIfCantBeResolved(ex); throw; } }
public override void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity) { bool canGetCredentials = false; var authService = Resolver.Resolve <IAuthService>(); if (authService.IsAuthenticated) { var lockService = Resolver.Resolve <ILockService>(); var lockType = lockService.GetLockTypeAsync(false).GetAwaiter().GetResult(); canGetCredentials = lockType == App.Enums.LockType.Fingerprint || lockType == App.Enums.LockType.None; } if (!canGetCredentials) { var err = new NSError(new NSString("ASExtensionErrorDomain"), Convert.ToInt32(ASExtensionErrorCode.UserInteractionRequired), null); ExtensionContext.CancelRequest(err); return; } _context.CredentialIdentity = credentialIdentity; ProvideCredential(); }
public override async void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity) { try { InitAppIfNeeded(); await _stateService.Value.SetPasswordRepromptAutofillAsync(false); await _stateService.Value.SetPasswordVerifiedAutofillAsync(false); if (!await IsAuthed() || await IsLocked()) { var err = new NSError(new NSString("ASExtensionErrorDomain"), Convert.ToInt32(ASExtensionErrorCode.UserInteractionRequired), null); ExtensionContext.CancelRequest(err); return; } _context.CredentialIdentity = credentialIdentity; await ProvideCredentialAsync(false); } catch (Exception ex) { LoggerHelper.LogEvenIfCantBeResolved(ex); throw; } }