authelia/web/src/services/State.ts
Clement Michaud 9ae2096d2a Rewrite authelia frontend to improve user experience.
This refactoring simplify the code of the frontend and prepare the
portal for receiving a user settings page and an admin page.
2019-12-05 11:05:24 +01:00

17 lines
344 B
TypeScript

import { Get } from "./Client";
import { StatePath } from "./Api";
export enum AuthenticationLevel {
Unauthenticated = 0,
OneFactor = 1,
TwoFactor = 2,
}
export interface AutheliaState {
username: string;
authentication_level: AuthenticationLevel
}
export function getState() {
return Get<AutheliaState>(StatePath);
}