import * as HTTP from 'node:http'; export declare const DEFAULT_ISSUER = "https://oauth2.sigstore.dev/auth"; export declare const DEFAULT_CLIENT_ID = "sigstore"; /** How an identity token was obtained. */ export type IdentityFlow = 'supplied' | 'ci' | 'browser' | 'device'; /** What the caller may ask for; 'auto' picks by looking at the environment. */ export type RequestedFlow = 'auto' | 'ci' | 'browser' | 'device'; export interface IdentityTokenOptions { /** A token supplied by the caller; returned as-is. */ token?: string | undefined; /** OIDC issuer base URL (default: sigstore's Dex). */ issuer?: string | undefined; /** OAuth client id (default: 'sigstore'). */ clientID?: string | undefined; /** Dex connector to jump straight to (default: 'github'). */ connector?: string | undefined; flow?: RequestedFlow | undefined; /** Audience to request for the CI token (default: 'sigstore'). */ audience?: string | undefined; log?: ((line: string) => void) | undefined; } export interface IdentityTokenResult { token: string; flow: IdentityFlow; } /** * Resolve a connector name to what Dex expects. An empty value means "do not * preselect", which lands the user on the provider chooser. */ export declare function connectorId(name: string | undefined): string | undefined; /** The audience Fulcio expects to find in the token it is handed. */ export declare const FULCIO_AUDIENCE = "sigstore"; /** Obtain an identity token, by whichever route fits where this is running. */ export declare function identityToken(options?: IdentityTokenOptions): Promise; /** * Whether an ambient CI identity is available. Only GitHub's shape is * implemented, since that is what the `--connector github` path mirrors, but * this is the hook other providers would land on. */ export declare function inCI(): boolean; export declare function listen(): Promise<{ server: HTTP.Server; port: number; }>; export declare function respond(res: HTTP.ServerResponse, status: number, message: string): void; export declare function canOpenBrowser(): boolean; export declare function openBrowser(url: string): void; //# sourceMappingURL=oidc.d.ts.map