export declare const AUTH_PROTECTED_RESOURCE_METADATA_DISCOVERY_PATH = "/.well-known/oauth-protected-resource";
export declare const AUTH_SERVER_METADATA_DISCOVERY_PATH = "/.well-known/oauth-authorization-server";
export interface IAuthorizationProtectedResourceMetadata {
    resource: string;
    resource_name?: string;
    authorization_servers?: string[];
    jwks_uri?: string;
    scopes_supported?: string[];
    bearer_methods_supported?: string[];
    resource_signing_alg_values_supported?: string[];
    resource_encryption_alg_values_supported?: string[];
    resource_encryption_enc_values_supported?: string[];
    resource_documentation?: string;
    resource_policy_uri?: string;
    resource_tos_uri?: string;
}
export interface IAuthorizationServerMetadata {
    issuer: string;
    authorization_endpoint?: string;
    token_endpoint?: string;
    device_authorization_endpoint?: string;
    jwks_uri?: string;
    registration_endpoint?: string;
    scopes_supported?: string[];
    response_types_supported: string[];
    response_modes_supported?: string[];
    grant_types_supported?: string[];
    token_endpoint_auth_methods_supported?: string[];
    token_endpoint_auth_signing_alg_values_supported?: string[];
    service_documentation?: string;
    ui_locales_supported?: string[];
    op_policy_uri?: string;
    op_tos_uri?: string;
    revocation_endpoint?: string;
    revocation_endpoint_auth_methods_supported?: string[];
    revocation_endpoint_auth_signing_alg_values_supported?: string[];
    introspection_endpoint?: string;
    introspection_endpoint_auth_methods_supported?: string[];
    introspection_endpoint_auth_signing_alg_values_supported?: string[];
    code_challenge_methods_supported?: string[];
}
export interface IRequiredAuthorizationServerMetadata extends IAuthorizationServerMetadata {
    authorization_endpoint: string;
    token_endpoint: string;
    registration_endpoint: string;
}
export interface IAuthorizationDynamicClientRegistrationResponse {
    client_id: string;
    client_secret?: string;
    client_secret_expires_at?: number;
    client_name?: string;
    client_uri?: string;
    redirect_uris?: string[];
    grant_types?: string[];
    response_types?: string[];
    token_endpoint_auth_method?: string;
}
export interface IAuthorizationAuthorizeResponse {
    code: string;
    state: string;
}
export interface IAuthorizationAuthorizeErrorResponse {
    error: string;
    error_description?: string;
    error_uri?: string;
    state: string;
}
export interface IAuthorizationTokenResponse {
    access_token: string;
    token_type: string;
    expires_in?: number;
    refresh_token?: string;
    scope?: string;
    id_token?: string;
}
export interface IAuthorizationTokenErrorResponse {
    error: string;
    error_description?: string;
    error_uri?: string;
}
export interface IAuthorizationDeviceResponse {
    device_code: string;
    user_code: string;
    verification_uri: string;
    verification_uri_complete?: string;
    expires_in: number;
    interval?: number;
}
export interface IAuthorizationDeviceTokenErrorResponse {
    error: "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type" | "invalid_scope" | "authorization_pending" | "slow_down" | "access_denied" | "expired_token" | string;
    error_description?: string;
    error_uri?: string;
}
export interface IAuthorizationJWTClaims {
    jti: string;
    sub: string;
    iss: string;
    aud?: string | string[];
    exp?: number;
    nbf?: number;
    iat?: number;
    azp?: string;
    scope?: string;
    name?: string;
    given_name?: string;
    family_name?: string;
    middle_name?: string;
    preferred_username?: string;
    email?: string;
    email_verified?: boolean;
    picture?: string;
    auth_time?: number;
    acr?: string;
    amr?: string[];
    sid?: string;
    address?: {
        formatted?: string;
        street_address?: string;
        locality?: string;
        region?: string;
        postal_code?: string;
        country?: string;
    };
    groups?: string[];
    roles?: string[];
    [key: string]: unknown;
}
export declare function isAuthorizationProtectedResourceMetadata(obj: unknown): obj is IAuthorizationProtectedResourceMetadata;
export declare function isAuthorizationServerMetadata(obj: unknown): obj is IAuthorizationServerMetadata;
export declare function isAuthorizationDynamicClientRegistrationResponse(obj: unknown): obj is IAuthorizationDynamicClientRegistrationResponse;
export declare function isAuthorizationAuthorizeResponse(obj: unknown): obj is IAuthorizationAuthorizeResponse;
export declare function isAuthorizationTokenResponse(obj: unknown): obj is IAuthorizationTokenResponse;
export declare function isAuthorizationDeviceResponse(obj: unknown): obj is IAuthorizationDeviceResponse;
export declare function isAuthorizationDeviceTokenErrorResponse(obj: unknown): obj is IAuthorizationDeviceTokenErrorResponse;
export declare function getDefaultMetadataForUrl(authorizationServer: URL): IRequiredAuthorizationServerMetadata & IRequiredAuthorizationServerMetadata;
export declare function getMetadataWithDefaultValues(metadata: IAuthorizationServerMetadata): IAuthorizationServerMetadata & IRequiredAuthorizationServerMetadata;
export declare const DEFAULT_AUTH_FLOW_PORT = 33418;
export declare function fetchDynamicRegistration(registrationEndpoint: string, clientName: string): Promise<IAuthorizationDynamicClientRegistrationResponse>;
export declare function parseWWWAuthenticateHeader(wwwAuthenticateHeaderValue: string): {
    scheme: string;
    params: Record<string, string>;
};
export declare function getClaimsFromJWT(token: string): IAuthorizationJWTClaims;
