27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Bit.Core.Enums;
|
|
|
|
namespace Bit.Core.Abstractions
|
|
{
|
|
public interface IVaultTimeoutService
|
|
{
|
|
long? DelayLockAndLogoutMs { get; set; }
|
|
|
|
Task CheckVaultTimeoutAsync();
|
|
Task<bool> ShouldTimeoutAsync(string userId = null);
|
|
Task ExecuteTimeoutActionAsync(string userId = null);
|
|
Task ClearAsync(string userId = null);
|
|
Task<bool> IsLockedAsync(string userId = null);
|
|
Task<bool> ShouldLockAsync(string userId = null);
|
|
Task<bool> IsLoggedOutByTimeoutAsync(string userId = null);
|
|
Task<bool> ShouldLogOutByTimeoutAsync(string userId = null);
|
|
Task<Tuple<bool, bool>> IsPinLockSetAsync(string userId = null);
|
|
Task<bool> IsBiometricLockSetAsync(string userId = null);
|
|
Task LockAsync(bool allowSoftLock = false, bool userInitiated = false, string userId = null);
|
|
Task LogOutAsync(bool userInitiated = true, string userId = null);
|
|
Task SetVaultTimeoutOptionsAsync(int? timeout, VaultTimeoutAction? action);
|
|
Task<int?> GetVaultTimeout(string userId = null);
|
|
}
|
|
}
|