swaf/src/auth/AuthProof.ts

15 lines
321 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>;
2020-04-25 09:35:49 +02:00
revoke(session: Express.Session): Promise<void>;
2020-04-24 12:12:27 +02:00
}