import type { MiddlewareClass, MiddlewareContext, MiddlewareNext } from './Connect.js'; export interface LoginResult { error: boolean; token?: string; errorTitle?: string; errorMessage?: string; redirectUrl?: string; defaultUrl?: string; } export interface LoginOptions { loginProcessingUrl?: string; } export interface LogoutOptions { logoutUrl?: string; } /** * A helper method for Spring Security based form login. * @param username - username * @param password - password * @param options - defines additional options, e.g, the loginProcessingUrl etc. */ export declare function login(username: string, password: string, options?: LoginOptions): Promise; /** * A helper method for Spring Security based form logout * @param options - defines additional options, e.g, the logoutUrl. */ export declare function logout(options?: LogoutOptions): Promise; /** * It defines what to do when it detects a session is invalid. E.g., * show a login view. * It takes an EndpointCallContinue parameter, which can be * used to continue the endpoint call. */ export type OnInvalidSessionCallback = () => Promise; /** * A helper class for handling invalid sessions during an endpoint call. * E.g., you can use this to show user a login page when the session has * expired. */ export declare class InvalidSessionMiddleware implements MiddlewareClass { private readonly onInvalidSessionCallback; constructor(onInvalidSessionCallback: OnInvalidSessionCallback); invoke(context: MiddlewareContext, next: MiddlewareNext): Promise; } //# sourceMappingURL=Authentication.d.ts.map