Trait aliri_tower::OnScopeError
source · [−]pub trait OnScopeError {
type Body;
fn on_missing_scope_claim(&self) -> Response<Self::Body>;
fn on_scope_policy_failure(
&self,
held: &Scope,
policy: &ScopePolicy
) -> Response<Self::Body>;
}
Expand description
Handler for responding to failures while verifying scope claims
Required Associated Types
Required Methods
fn on_missing_scope_claim(&self) -> Response<Self::Body>
fn on_missing_scope_claim(&self) -> Response<Self::Body>
Response when the scope claim is missing
This can also happen if the appropriate Claim
value
wasn’t attached to the request prior to executing the scopes
verifier.
fn on_scope_policy_failure(
&self,
held: &Scope,
policy: &ScopePolicy
) -> Response<Self::Body>
fn on_scope_policy_failure(
&self,
held: &Scope,
policy: &ScopePolicy
) -> Response<Self::Body>
Response when access is rejected due to insufficient permissions