import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api'; import { HttpAuthService, AuthService, DiscoveryService, BackstagePrincipalTypes, BackstageCredentials } from '@backstage/backend-plugin-api'; import { Request, Response } from 'express'; /** * @public * Options for creating a DefaultHttpAuthService. */ interface DefaultHttpAuthServiceOptions { auth: AuthService; discovery: DiscoveryService; pluginId: string; /** * Optionally override logic for extracting the token from the request. */ getTokenFromRequest?: (req: Request) => { token?: string; }; } /** * @public * DefaultHttpAuthService is the default implementation of the HttpAuthService */ declare class DefaultHttpAuthService implements HttpAuthService { #private; private constructor(); static create(options: DefaultHttpAuthServiceOptions): DefaultHttpAuthService; credentials(req: Request, options?: { allow?: Array; allowLimitedAccess?: boolean; }): Promise>; issueUserCookie(res: Response, options?: { credentials?: BackstageCredentials; }): Promise<{ expiresAt: Date; }>; } /** * Authentication of HTTP requests. * * See {@link @backstage/code-plugin-api#HttpAuthService} * and {@link https://backstage.io/docs/backend-system/core-services/http-auth | the service docs} * for more information. * * @public */ declare const httpAuthServiceFactory: _backstage_backend_plugin_api.ServiceFactory; export { DefaultHttpAuthService, httpAuthServiceFactory }; export type { DefaultHttpAuthServiceOptions };