authelia/web/src/services/State.ts

18 lines
376 B
TypeScript
Raw Normal View History

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