15 lines
297 B
TypeScript
15 lines
297 B
TypeScript
|
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>;
|
||
|
}
|