pub struct AgentWidgetAuth {
pub allowed_origins: Vec<String>,
pub public_key: Option<String>,
pub organization_id: Option<String>,
}Expand description
The embed-auth policy for one agent.
Fields§
§allowed_origins: Vec<String>Origins permitted to embed this agent. Each entry is an exact origin
(https://app.example.com), a host wildcard (https://*.smoo.ai), or
* (any). An empty list means no origin is allowed (deny all) —
configure at least one entry to permit embedding.
public_key: Option<String>Shared secret used to verify a pre-auth authContext HMAC. None means
the agent does not support authContext (any supplied one is rejected).
organization_id: Option<String>The organization this agent belongs to, when the host policy service
knows it. A multi-tenant host (whose Conversation/Participant rows
carry an org FK) populates this so a widget visitor’s session is created
under the agent’s real org — visitors authenticate via origin +
authContext, not a JWT, so the org cannot come from a bearer token.
None (the default, and the OSS/dev case) leaves org derivation to the
connection’s JWT principal, then the server’s seed org.
Trait Implementations§
Source§impl Clone for AgentWidgetAuth
impl Clone for AgentWidgetAuth
Source§fn clone(&self) -> AgentWidgetAuth
fn clone(&self) -> AgentWidgetAuth
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 AgentWidgetAuth
impl Debug for AgentWidgetAuth
Source§impl Default for AgentWidgetAuth
impl Default for AgentWidgetAuth
Source§fn default() -> AgentWidgetAuth
fn default() -> AgentWidgetAuth
Source§impl<'de> Deserialize<'de> for AgentWidgetAuth
impl<'de> Deserialize<'de> for AgentWidgetAuth
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 AgentWidgetAuth
impl RefUnwindSafe for AgentWidgetAuth
impl Send for AgentWidgetAuth
impl Sync for AgentWidgetAuth
impl Unpin for AgentWidgetAuth
impl UnsafeUnpin for AgentWidgetAuth
impl UnwindSafe for AgentWidgetAuth
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> FromResponse for Twhere
T: DeserializeOwned,
impl<T> FromResponse for Twhere
T: DeserializeOwned,
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