#[non_exhaustive]pub enum InjectedParamSource {
Jwt(String),
Enrichment(String),
}Expand description
Source from which an injected SQL parameter is resolved at runtime.
Injected parameters are not exposed in the GraphQL schema. They are silently added to SQL queries and function calls, resolved from the authenticated request context.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Jwt(String)
Extract a value from the JWT claims.
Special aliases resolved before attribute lookup:
"sub"→SecurityContext.user_id"tenant_id"/"org_id"→SecurityContext.tenant_id- any other name →
SecurityContext.attributes.get(name)
Enrichment(String)
Extract a DB-resolved enriched-identity field, read from the reserved
fraiseql.enriched.* attribute namespace (#539).
Unlike InjectedParamSource::Jwt, there is no fallback to a raw
claim or a well-known field: the namespace is forge-proof and a missing
enriched field is a hard error, so a raw claim of the same name can never
impersonate a DB-derived identity parameter. The wrapped value is the
enriched field name, without the fraiseql.enriched. prefix.
Trait Implementations§
Source§impl Clone for InjectedParamSource
impl Clone for InjectedParamSource
Source§fn clone(&self) -> InjectedParamSource
fn clone(&self) -> InjectedParamSource
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 InjectedParamSource
impl Debug for InjectedParamSource
Source§impl<'de> Deserialize<'de> for InjectedParamSource
impl<'de> Deserialize<'de> for InjectedParamSource
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>,
impl Eq for InjectedParamSource
Source§impl PartialEq for InjectedParamSource
impl PartialEq for InjectedParamSource
Source§impl Serialize for InjectedParamSource
impl Serialize for InjectedParamSource
impl StructuralPartialEq for InjectedParamSource
Auto Trait Implementations§
impl Freeze for InjectedParamSource
impl RefUnwindSafe for InjectedParamSource
impl Send for InjectedParamSource
impl Sync for InjectedParamSource
impl Unpin for InjectedParamSource
impl UnsafeUnpin for InjectedParamSource
impl UnwindSafe for InjectedParamSource
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.