mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 19:23:52 +00:00
Assign ownership to many of the remaining libs/common files. Criteria for ownership: * Files used by a single team, is now owned by that team. * Files related to a domain owned by a team is now owned by that team. * Where ownership is unclear the "lowest level" service takes ownership.
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import { SecretVerificationRequest } from "../../models/request/secret-verification.request";
|
|
import { Verification } from "../../types/verification";
|
|
|
|
export abstract class UserVerificationService {
|
|
buildRequest: <T extends SecretVerificationRequest>(
|
|
verification: Verification,
|
|
requestClass?: new () => T,
|
|
alreadyHashed?: boolean
|
|
) => Promise<T>;
|
|
verifyUser: (verification: Verification) => Promise<boolean>;
|
|
requestOTP: () => Promise<void>;
|
|
/**
|
|
* Check if user has master password or only uses passwordless technologies to log in
|
|
* @param userId The user id to check. If not provided, the current user is used
|
|
* @returns True if the user has a master password
|
|
*/
|
|
hasMasterPassword: (userId?: string) => Promise<boolean>;
|
|
/**
|
|
* Check if the user has a master password and has used it during their current session
|
|
* @param userId The user id to check. If not provided, the current user id used
|
|
* @returns True if the user has a master password and has used it in the current session
|
|
*/
|
|
hasMasterPasswordAndMasterKeyHash: (userId?: string) => Promise<boolean>;
|
|
}
|