interface Auth {
    hasRealmRole: (role: string) => boolean;
    hasResourceRole: (role: string, resource?: string) => boolean;
    isAuthenticated: () => undefined | boolean;
    loadUserProfile: () => Promise<KeycloakProfile>;
    logout: (options?: KeycloakLogoutOptions) => Promise<void>;
    realmAccess: () => undefined | KeycloakRoles;
    resourceAccess: () => undefined | KeycloakResourceAccess;
    token: () => undefined | string;
    tokenParsed: () => | undefined
    | KeycloakTokenParsed & { preferred_username?: string };
}

Properties

hasRealmRole: (role: string) => boolean
hasResourceRole: (role: string, resource?: string) => boolean
isAuthenticated: () => undefined | boolean
loadUserProfile: () => Promise<KeycloakProfile>
logout: (options?: KeycloakLogoutOptions) => Promise<void>
realmAccess: () => undefined | KeycloakRoles
resourceAccess: () => undefined | KeycloakResourceAccess
token: () => undefined | string
tokenParsed: () => | undefined
| KeycloakTokenParsed & { preferred_username?: string }