1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-29 07:59:42 +01:00
bitwarden-browser/src/abstractions/policy.service.ts

19 lines
766 B
TypeScript
Raw Normal View History

2020-01-29 04:24:02 +01:00
import { PolicyData } from '../models/data/policyData';
2020-03-02 20:45:06 +01:00
import { MasterPasswordPolicyOptions } from '../models/domain/masterPasswordPolicyOptions';
import { Policy } from '../models/domain/policy';
2020-01-29 04:24:02 +01:00
import { PolicyType } from '../enums/policyType';
export abstract class PolicyService {
policyCache: Policy[];
clearCache: () => void;
getAll: (type?: PolicyType) => Promise<Policy[]>;
replace: (policies: { [id: string]: PolicyData; }) => Promise<any>;
clear: (userId: string) => Promise<any>;
2020-03-02 20:45:06 +01:00
getMasterPasswordPolicyOptions: (policies?: Policy[]) => Promise<MasterPasswordPolicyOptions>;
evaluateMasterPassword: (passwordStrength: number, newPassword: string,
enforcedPolicyOptions?: MasterPasswordPolicyOptions) => boolean;
2020-01-29 04:24:02 +01:00
}