/** * OAuth2 Error Codes * * Standard error codes as defined in RFC 6749 Section 5.2 (Error Response) * and RFC 7009 Section 2.2.1 (Token Revocation Error Response). * * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 */ export declare const OAuthErrorCodes: { /** * The request is missing a required parameter, includes an unsupported * parameter value, repeats a parameter, includes multiple credentials, * or is otherwise malformed. */ readonly INVALID_REQUEST: "invalid_request"; /** * Client authentication failed (unknown client, no client authentication * included, or unsupported authentication method). */ readonly INVALID_CLIENT: "invalid_client"; /** * The provided authorization grant or refresh token is invalid, expired, * revoked, does not match the redirection URI used in the authorization * request, or was issued to another client. */ readonly INVALID_GRANT: "invalid_grant"; /** * The authenticated client is not authorized to use this authorization * grant type. */ readonly UNAUTHORIZED_CLIENT: "unauthorized_client"; /** * The authorization grant type is not supported by the authorization server. */ readonly UNSUPPORTED_GRANT_TYPE: "unsupported_grant_type"; /** * The requested scope is invalid, unknown, malformed, or exceeds the * scope granted by the resource owner. */ readonly INVALID_SCOPE: "invalid_scope"; /** * The resource owner or authorization server denied the request. * Used in authorization endpoint error responses. */ readonly ACCESS_DENIED: "access_denied"; /** * The authorization server does not support obtaining an authorization * code using this method. Used when response_type is not 'code'. */ readonly UNSUPPORTED_RESPONSE_TYPE: "unsupported_response_type"; /** * The authorization server encountered an unexpected condition that * prevented it from fulfilling the request. */ readonly SERVER_ERROR: "server_error"; /** * The authorization server is currently unable to handle the request * due to temporary overloading or maintenance of the server. */ readonly TEMPORARILY_UNAVAILABLE: "temporarily_unavailable"; }; export type OAuthErrorCode = (typeof OAuthErrorCodes)[keyof typeof OAuthErrorCodes]; /** * Human-readable error descriptions for OAuth error codes. */ export declare const OAuthErrorDescriptions: Record; /** * OAuth Error Response interface per RFC 6749 Section 5.2 */ export interface OAuthErrorResponse { error: OAuthErrorCode; error_description?: string; error_uri?: string; } /** * Creates a standard OAuth error response object. * @param code - OAuth error code * @param description - Optional custom description (uses default if not provided) * @param uri - Optional URI for more information about the error */ export declare function createOAuthError(code: OAuthErrorCode, description?: string, uri?: string): OAuthErrorResponse; //# sourceMappingURL=oauth.errors.d.ts.map