pub enum Verdict {
Allow,
Narrow {
granted: ScopeSet,
cut: ScopeSet,
rule: String,
},
Deny {
reason: String,
rule: String,
},
}Expand description
What this server decided about one authorization request.
Derived, not chosen: verdict_for computes it from the requested scope
and the ceiling, and a didbot_pds::policy::PolicyGate refusal
overrides it. A policy denies and never grants (plan/policy.md), so
there is no variant here that widens anything.
Variants§
Allow
The ceiling grants the request exactly as asked.
Narrow
The ceiling grants part of the request.
Fields
cut: ScopeSetThe requested atoms no granted atom covers in full — see
ScopeSet::narrow. Never part of the approval, so a login
approved against this verdict never carries one.
rule: StringWhat did the narrowing: CEILING_RULE, or a policy’s own id.
Deny
Nothing is granted.
Fields
rule: StringWhat refused: CEILING_RULE, or a policy’s own id.
Implementations§
Source§impl Verdict
impl Verdict
Sourcepub fn granted(&self, requested: &ScopeSet) -> ScopeSet
pub fn granted(&self, requested: &ScopeSet) -> ScopeSet
What a token issued under the ceiling this verdict was reached with would carry, given the scope that was requested.
Verdict::Allow grants the request whole, which is what an empty
cut means; Verdict::Deny grants nothing, which is why an
approval of a denied record can never mint a code.
fn to_json(&self) -> Value
Trait Implementations§
impl Eq for Verdict
impl StructuralPartialEq for Verdict
Auto Trait Implementations§
impl Freeze for Verdict
impl RefUnwindSafe for Verdict
impl Send for Verdict
impl Sync for Verdict
impl Unpin for Verdict
impl UnsafeUnpin for Verdict
impl UnwindSafe for Verdict
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more