import { IdentityApi, IdentityApiGetIdentityRequest } from './IdentityApi';
import { BackstageIdentityResponse } from '../types';
import { DiscoveryService } from '@backstage/backend-plugin-api';
/**
 * An identity client options object which allows extra configurations
 *
 * @experimental This is not a stable API yet
 * @public
 */
export type IdentityClientOptions = {
    discovery: DiscoveryService;
    issuer?: string;
    /** JWS "alg" (Algorithm) Header Parameter values. Defaults to an array containing just ES256.
     * More info on supported algorithms: https://github.com/panva/jose */
    algorithms?: string[];
};
/**
 * An identity client to interact with auth-backend and authenticate Backstage
 * tokens
 *
 * @experimental This is not a stable API yet
 * @public
 */
export declare class DefaultIdentityClient implements IdentityApi {
    private readonly discovery;
    private readonly issuer?;
    private readonly algorithms?;
    private keyStore?;
    private keyStoreUpdated;
    /**
     * Create a new {@link DefaultIdentityClient} instance.
     */
    static create(options: IdentityClientOptions): DefaultIdentityClient;
    private constructor();
    getIdentity(options: IdentityApiGetIdentityRequest): Promise<BackstageIdentityResponse | undefined>;
    /**
     * Verifies the given backstage identity token
     * Returns a BackstageIdentity (user) matching the token.
     * The method throws an error if verification fails.
     *
     * @deprecated You should start to use getIdentity instead of authenticate to retrieve the user
     * identity.
     */
    authenticate(token: string | undefined): Promise<BackstageIdentityResponse>;
    /**
     * If the last keystore refresh is stale, update the keystore URL to the latest
     */
    private refreshKeyStore;
}
