/** * @deprecated This package is no longer used by Umbraco auth. Scheduled for removal in Umbraco 19. * The Umbraco backoffice now uses cookie-based authentication with a minimal PKCE client. * Data classes (TokenResponse, AuthorizationRequest, etc.) remain functional for compatibility. * Handler classes (RedirectRequestHandler, BaseTokenRequestHandler, etc.) reject with an error * because the underlying OAuth operations are no longer possible with cookie-based auth. */ /** * @deprecated Scheduled for removal in Umbraco 19. */ export type TokenType = 'bearer' | 'mac'; /** * @deprecated Scheduled for removal in Umbraco 19. */ export interface TokenResponseJson { access_token: string; token_type?: TokenType; expires_in?: string; refresh_token?: string; scope?: string; id_token?: string; issued_at?: number; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export type ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'unauthorized_client' | 'unsupported_grant_type' | 'invalid_scope'; /** * @deprecated Scheduled for removal in Umbraco 19. */ export interface TokenErrorJson { error: ErrorType; error_description?: string; error_uri?: string; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class TokenResponse { accessToken: string; tokenType: TokenType; expiresIn: number | undefined; refreshToken: string | undefined; scope: string | undefined; idToken: string | undefined; issuedAt: number; constructor(response: TokenResponseJson); toJson(): TokenResponseJson; isValid(buffer?: number): boolean; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class TokenError { error: ErrorType; errorDescription: string | undefined; errorUri: string | undefined; constructor(tokenError: TokenErrorJson); toJson(): TokenErrorJson; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export interface StringMap { [key: string]: string; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export interface LocationLike { hash: string; host: string; origin: string; hostname: string; pathname: string; port: string; protocol: string; search: string; assign(url: string): void; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export interface AuthorizationServiceConfigurationJson { authorization_endpoint: string; token_endpoint: string; revocation_endpoint: string; end_session_endpoint?: string; userinfo_endpoint?: string; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class AuthorizationServiceConfiguration { authorizationEndpoint: string; tokenEndpoint: string; revocationEndpoint: string; userInfoEndpoint?: string; endSessionEndpoint?: string; constructor(request: AuthorizationServiceConfigurationJson); toJson(): AuthorizationServiceConfigurationJson; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export interface AuthorizationRequestJson { response_type: string; client_id: string; redirect_uri: string; scope: string; state?: string; extras?: StringMap; internal?: StringMap; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class AuthorizationRequest { static RESPONSE_TYPE_TOKEN: string; static RESPONSE_TYPE_CODE: string; clientId: string; redirectUri: string; scope: string; responseType: string; state: string; extras?: StringMap; internal?: StringMap; constructor(request: AuthorizationRequestJson); setupCodeVerifier(): Promise; toJson(): Promise; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class AuthorizationResponse { code: string; state: string; constructor(response: { code: string; state: string; }); } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class AuthorizationError { error: string; errorDescription: string | undefined; errorUri: string | undefined; state: string | undefined; constructor(error: { error: string; error_description?: string; error_uri?: string; state?: string; }); } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare const GRANT_TYPE_AUTHORIZATION_CODE = "authorization_code"; /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare const GRANT_TYPE_REFRESH_TOKEN = "refresh_token"; /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class AuthorizationNotifier { setAuthorizationListener(_listener: unknown): void; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class LocalStorageBackend { getItem(name: string): Promise; setItem(name: string, value: string): Promise; removeItem(name: string): Promise; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class BasicQueryStringUtils { parse(_input: LocationLike, _useHash?: boolean): StringMap; stringify(input: StringMap): string; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class FetchRequestor { xhr(_settings: unknown): Promise; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class RedirectRequestHandler { constructor(..._args: unknown[]); setAuthorizationNotifier(_notifier: unknown): void; performAuthorizationRequest(_config: unknown, _request: unknown): Promise; completeAuthorizationRequestIfPossible(): Promise; cleanupStaleAuthorizationData(): Promise; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class BaseTokenRequestHandler { constructor(..._args: unknown[]); performTokenRequest(_config: unknown, _request: unknown): Promise; performRevokeTokenRequest(_config: unknown, _request: unknown): Promise; } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class TokenRequest { clientId: string; redirectUri: string; grantType: string; code?: string; refreshToken?: string; extras?: StringMap; constructor(request: { client_id: string; redirect_uri: string; grant_type: string; code?: string; refresh_token?: string; extras?: StringMap; }); } /** * @deprecated Scheduled for removal in Umbraco 19. */ export declare class RevokeTokenRequest { token: string; tokenTypeHint?: string; clientId?: string; constructor(request: { token: string; token_type_hint?: string; client_id?: string; }); }