@fakel/rest-admin
Version:
An application that makes it easier to work with your API
19 lines (16 loc) • 409 B
text/typescript
export type LoginPayload = {
username: string;
password: string;
};
export type AuthProvider = {
login: (payload: LoginPayload) => Promise<void>;
logout: () => Promise<void>;
getMe: () => Promise<any>;
getPermissions: () => Promise<any>;
checkAuth: () => Promise<boolean>;
checkError: (error) => Promise<void>;
};
export type AuthProviderOptions = {
apiBaseUrl: string;
client?: any;
};