/** * @module * * Implements the `client_secret_post` client authentication method, where the * client authenticates by including its `client_id` and `client_secret` in the * request body as form-urlencoded or JSON parameters. * * @see https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1 */ import { ClientAuthMethod, ClientAuthMethodResponse } from "./types.js"; /** * {@link ClientAuthMethod} implementation for the `client_secret_post` authentication method. * * Extracts client credentials from the request body (`client_id` and `client_secret` * parameters), supporting both `application/x-www-form-urlencoded` and `application/json` * content types. * * @see https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1 */ export declare class ClientSecretPost implements ClientAuthMethod { /** * The identifier for this authentication method. * Always `"client_secret_post"`. */ get method(): "client_secret_post"; /** * Whether the client secret is optional for this method. * Always `false` - a client secret is required for `client_secret_post`. */ get secretIsOptional(): boolean; /** * Extracts the `client_id` and `client_secret` from the request body. * * Sets `hasAuthMethod` to `true` only when both `client_id` and `client_secret` * fields are present in the body, allowing the caller to distinguish between * "this method was attempted" and "no credentials provided". * * Supports `application/x-www-form-urlencoded` and `application/json` content types. * Returns `{ hasAuthMethod: false }` for any other content type. * * @param req - The incoming HTTP request. * @returns The extracted client credentials, or `{ hasAuthMethod: false }` if the * body does not contain `client_id` and `client_secret` fields. */ extractClientCredentials(req: Request): Promise; } //# sourceMappingURL=client_secret_post.d.ts.map