swaf/src/auth/AuthProof.ts

15 lines
297 B
TypeScript
Raw Normal View History

2020-04-24 12:12:27 +02:00
import User from "./models/User";
export default interface AuthProof {
isValid(): Promise<boolean>;
isAuthorized(): Promise<boolean>;
isOwnedBy(userId: number): Promise<boolean>;
getUser(): Promise<User | null>;
getEmail(): Promise<string>;
revoke(): Promise<void>;
}