#[non_exhaustive]pub struct AuthzRequest<'a> {
pub principal: Option<&'a SecurityContext>,
pub operation: OperationKind,
pub name: &'a str,
pub input: Option<&'a Value>,
pub target_type: Option<&'a str>,
pub nesting: Option<&'a AuthzNesting>,
}Expand description
An operation-level authorization request handed to an Authorizer.
Carries the principal (or None for an anonymous request), the operation kind
and root field name, the type read, where a nested level sits, and the request
input — the inputs a static role check lacks.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.principal: Option<&'a SecurityContext>The authenticated principal, or None for an unauthenticated (anonymous) request.
operation: OperationKindThe kind of operation (query / mutation / subscription).
name: &'a strThe root operation field name (e.g. "users", "createUser", "_entities",
"__schema").
input: Option<&'a Value>The request input — GraphQL variables or REST arguments — when present.
target_type: Option<&'a str>The type this request reads or writes: the root field’s return type at the root, the
level’s type at a nested level. None only where the root names no single type
(introspection, node and _entities before their type is known — each is asked
again with it once it is).
nesting: Option<&'a AuthzNesting>None at the root; where a nested level sits otherwise.