import { LfsFsCache } from "@kie-tools-core/workspaces-git-fs/dist/lfs/LfsFsCache";
import { LfsStorageService } from "@kie-tools-core/workspaces-git-fs/dist/lfs/LfsStorageService";
import { IDToken, ServerMetadata, TokenEndpointResponse } from "openid-client";
export declare const authSessionFsCache: LfsFsCache;
export declare const authSessionFsService: LfsStorageService;
export declare const authSessionBroadcastChannel: BroadcastChannel;
export declare const AUTH_SESSIONS_FILE_PATH = "/authSessions.json";
export declare const AUTH_SESSIONS_FS_NAME = "auth_sessions";
export declare const AUTH_SESSIONS_VERSION_NUMBER = 2;
export declare const AUTH_SESSIONS_FS_NAME_WITH_VERSION: string;
export declare const AUTH_SESSION_TEMP_OPENID_AUTH_DATA_STORAGE_KEY = "temporaryOpenIdAuthData";
export declare const AUTH_SESSION_RUNTIME_AUTH_SERVER_URL_ENDPOINT = "q/oidc";
export declare const AUTH_SESSION_RUNTIME_AUTH_SERVER_OPENID_CONFIGURATION_PATH = ".well-known/openid-configuration";
export declare const AUTH_SESSION_OIDC_DEFAULT_SCOPES = "openid email profile";
export declare function mapSerializer(_: string, value: any): any;
export declare function mapDeSerializer(_: string, value: any): any;
export type OpenIDConfiguration = {
    issuer: string;
    token_endpoint: string;
    authorization_endpoint: string;
    userinfo_endpoint: string;
    token_endpoint_auth_methods_supported?: string[];
    jwks_uri: string;
    response_types_supported?: string[];
    grant_types_supported?: string[];
    token_endpoint_auth_signing_alg_values_supported?: string[];
    response_modes_supported?: string[];
    id_token_signing_alg_values_supported?: string[];
    revocation_endpoint: string;
    subject_types_supported?: string[];
    end_session_endpoint: string;
    introspection_endpoint: string;
};
export declare enum AuthSessionType {
    OPENID_CONNECT = "oidc",
    UNAUTHENTICATED = "unauthenticated"
}
export type OpenIDConnectAuthSession = {
    id: string;
    type: AuthSessionType.OPENID_CONNECT;
    version: number;
    name: string;
    tokens: TokenEndpointResponse;
    username?: string;
    roles?: string[];
    impersonator?: boolean;
    claims: IDToken;
    issuer: string;
    clientId: string;
    clientSecret?: string;
    audience?: string;
    scope: string;
    runtimeUrl: string;
    status: AuthSessionStatus;
    createdAtDateISO: string;
    tokensRefreshedAtDateISO: string;
};
export type UnauthenticatedAuthSession = {
    id: string;
    type: AuthSessionType.UNAUTHENTICATED;
    version: number;
    name: string;
    impersonator: true;
    runtimeUrl: string;
    status: AuthSessionStatus;
    createdAtDateISO: string;
};
export type AuthSession = OpenIDConnectAuthSession | UnauthenticatedAuthSession;
export type OidcAuthUrlParameters = {
    redirect_uri: string;
    scope: string;
    code_verifier: string;
    code_challenge: string;
    code_challenge_method: string;
    nonce?: string;
    prompt?: string;
    state?: string;
    audience?: string;
};
export type TemporaryAuthSessionData = {
    isAuthenticationRequired: true;
    runtimeUrl: string;
    clientId: string;
    name: string;
    parameters: OidcAuthUrlParameters;
    serverMetadata: ServerMetadata;
} | {
    isAuthenticationRequired: false;
    runtimeUrl: string;
    name: string;
};
export declare enum AuthSessionStatus {
    VALID = 0,
    INVALID = 1
}
export declare function isOpenIdConnectAuthSession(authSession?: AuthSession): authSession is OpenIDConnectAuthSession;
export declare function isUnauthenticatedAuthSession(authSession?: AuthSession): authSession is UnauthenticatedAuthSession;
export declare function getAuthSessionDisplayInfo(authSession: undefined | AuthSession): {
    shortDisplayName: string;
    fullDisplayName: string;
    userFriendlyName: string;
    type: string;
    username: string;
};
export declare function parseJwtToken(token: string): any;
//# sourceMappingURL=AuthSessionApi.d.ts.map