mirror of
https://github.com/bitwarden/mobile.git
synced 2024-09-27 03:52:57 +02:00
f1419a75f6
* SSO login flow for pre-existing user and no 2FA * 2FA progress * 2FA support * Added SSO flows and functionality * Handle webauthenticator cancellation gracefully * updates & bugfixes * Added state validation to web auth response handling * SSO auth, account registration, and environment settings support for iOS extensions * Added SSO prevalidation to auth process * prevalidation now hitting identity service base url * additional error handling * Requested changes * fixed case
32 lines
1.4 KiB
C#
32 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Models.Domain;
|
|
|
|
namespace Bit.Core.Abstractions
|
|
{
|
|
public interface IAuthService
|
|
{
|
|
string Email { get; set; }
|
|
string MasterPasswordHash { get; set; }
|
|
string Code { get; set; }
|
|
string CodeVerifier { get; set; }
|
|
string SsoRedirectUrl { get; set; }
|
|
TwoFactorProviderType? SelectedTwoFactorProviderType { get; set; }
|
|
Dictionary<TwoFactorProviderType, TwoFactorProvider> TwoFactorProviders { get; set; }
|
|
Dictionary<TwoFactorProviderType, Dictionary<string, object>> TwoFactorProvidersData { get; set; }
|
|
|
|
TwoFactorProviderType? GetDefaultTwoFactorProvider(bool u2fSupported);
|
|
bool AuthingWithSso();
|
|
bool AuthingWithPassword();
|
|
List<TwoFactorProvider> GetSupportedTwoFactorProviders();
|
|
Task<AuthResult> LogInAsync(string email, string masterPassword);
|
|
Task<AuthResult> LogInSsoAsync(string code, string codeVerifier, string redirectUrl);
|
|
Task<AuthResult> LogInCompleteAsync(string email, string masterPassword, TwoFactorProviderType twoFactorProvider, string twoFactorToken, bool? remember = null);
|
|
Task<AuthResult> LogInTwoFactorAsync(TwoFactorProviderType twoFactorProvider, string twoFactorToken, bool? remember = null);
|
|
void LogOut(Action callback);
|
|
void Init();
|
|
}
|
|
}
|