/** * Base class for all OAuth 2.0 errors. * * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 */ export declare class OAuth2Error extends Error { /** HTTP status code to return. */ readonly statusCode: number; /** The OAuth 2.0 `error` code string. */ readonly errorCode: string; errorUri?: string; constructor(message: string, statusCode?: number, errorCode?: string, errorUri?: string); } /** * An error that encapsulates multiple OAuth2Error instances, such as when trying multiple flows in OIDCMultipleFlows. * The individual errors can be accessed via the `errors` property. */ export declare class OAuth2Errors extends OAuth2Error { readonly errors: OAuth2Error[]; constructor(errors: OAuth2Error[]); } /** The request is missing a required parameter or is otherwise malformed. */ export declare class InvalidRequestError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** Client authentication failed. */ export declare class InvalidClientError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The provided grant (code, credentials, refresh token) is invalid or expired. */ export declare class InvalidGrantError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The client is not authorized to use the requested grant type. */ export declare class UnauthorizedClientError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The grant type is not supported by the server. */ export declare class UnsupportedGrantTypeError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The requested scope is invalid, unknown, or exceeds what is allowed. */ export declare class InvalidScopeError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The resource owner denied the authorization request. */ export declare class AccessDeniedError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The authorization request is still pending. The client should keep polling. */ export declare class AuthorizationPendingError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The client is polling too quickly. Increase interval by 5 seconds. */ export declare class SlowDownError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The device code has expired. The client should request a new device code. */ export declare class ExpiredTokenError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The response type is not supported by the authorization server. */ export declare class UnsupportedResponseTypeError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** An unexpected server error occurred. */ export declare class ServerError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The access token is expired, revoked, or otherwise invalid. */ export declare class InvalidTokenError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The token does not have sufficient scope for the requested resource. */ export declare class InsufficientScopeError extends OAuth2Error { constructor(message?: string, errorUri?: string); } /** The request requires authentication but none was provided. */ export declare class UnauthorizedRequestError extends OAuth2Error { constructor(message?: string, errorUri?: string); } //# sourceMappingURL=errors.d.ts.map