import { Request } from 'express';
import { BackstageIdentityResponse } from '../types';
/**
 * Options to request the identity from a Backstage backend request
 *
 * @public
 */
export type IdentityApiGetIdentityRequest = {
    request: Request<unknown>;
};
/**
 * An identity client api to authenticate Backstage
 * tokens
 *
 * @experimental This is not a stable API yet
 * @public
 */
export interface IdentityApi {
    /**
     * Verifies the given backstage identity token
     * Returns a BackstageIdentity (user) matching the token.
     * The method throws an error if verification fails.
     */
    getIdentity(options: IdentityApiGetIdentityRequest): Promise<BackstageIdentityResponse | undefined>;
}
