#[non_exhaustive]pub enum InjectedParamSource {
Jwt(String),
JwtOptional(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, through
SecurityContext::jwt_claim: the
claim as the token carried it. A claim the token does not carry is an error;
no other claim and no derived value stands in for it (#1388).
JwtOptional(String)
A JWT claim the token may lack (#1418): NULL when it is absent, so one
mutation serves a direct token and a delegated one (an RFC 8693 act claim).
Valid only as a mutation function argument. On a query, or a type’s
inject_params, an inject param is a row filter, and an absent claim must not
become one: the compiler refuses it there and the runtime refuses it too. The
tenant claim is never optional.
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§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.