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>;
|
2020-03-02 18:05:05 +01:00
|
|
|
evaluateMasterPassword: (passwordStrength: number, newPassword: string,
|
|
|
|
enforcedPolicyOptions?: MasterPasswordPolicyOptions) => boolean;
|
2020-01-29 04:24:02 +01:00
|
|
|
}
|