RecaptchaService
object RecaptchaService
Provides Google reCAPTCHA verification and HTML widget rendering for Ktor applications.
Includes server-side token verification via the Google reCAPTCHA API, a Ktor route-level validation extension, and kotlinx.html helpers for embedding the reCAPTCHA script and widget.
Functions
Link copied to clipboard
Adds the Google reCAPTCHA JavaScript to the HTML HEAD if reCAPTCHA is enabled and a site key is configured.
Link copied to clipboard
Renders the reCAPTCHA widget <div> in the HTML body if reCAPTCHA is enabled and a site key is configured.
Link copied to clipboard
Validates the reCAPTCHA response token from form parameters within a Ktor RoutingContext.