pub struct PublicChatCaptchaConfig {
pub provider: CaptchaProvider,
pub enabled: bool,
pub site_key: String,
pub secret_key: Option<String>,
}Expand description
CAPTCHA / bot-mitigation configuration for a Public Chat channel.
When present and enabled, anonymous visitors must pass a challenge before a
session is created or any turn runs; signed-in visitors bypass it. The
secret_key is write-only: it is stored to call the provider’s verify
endpoint server-side and is redacted in API responses (only
secret_key_configured: bool is surfaced). The site_key is public and
returned so the web app can render the widget.
Fields§
§provider: CaptchaProviderChallenge provider. Defaults to Cloudflare Turnstile.
enabled: boolWhether the challenge is enforced. Defaults to true so adding a captcha config turns it on; set to false to keep keys configured but inactive.
site_key: StringPublic site key rendered by the client widget.
secret_key: Option<String>Secret key used for server-side verification. Write-only; redacted on read.
Trait Implementations§
Source§impl Clone for PublicChatCaptchaConfig
impl Clone for PublicChatCaptchaConfig
Source§fn clone(&self) -> PublicChatCaptchaConfig
fn clone(&self) -> PublicChatCaptchaConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PublicChatCaptchaConfig
impl Debug for PublicChatCaptchaConfig
Source§impl<'de> Deserialize<'de> for PublicChatCaptchaConfig
impl<'de> Deserialize<'de> for PublicChatCaptchaConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PublicChatCaptchaConfig
impl RefUnwindSafe for PublicChatCaptchaConfig
impl Send for PublicChatCaptchaConfig
impl Sync for PublicChatCaptchaConfig
impl Unpin for PublicChatCaptchaConfig
impl UnsafeUnpin for PublicChatCaptchaConfig
impl UnwindSafe for PublicChatCaptchaConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request