pub struct ScopePolicy { /* private fields */ }Expand description
Scope-based access control policy.
Reads the authenticated principal from the AuthContext (never from raw
Exchange properties) and evaluates whether it holds the required scopes.
When all_required is true, every listed scope must be present.
When all_required is false, at least one listed scope must be present.
Implementations§
Trait Implementations§
Source§impl SecurityPolicy for ScopePolicy
impl SecurityPolicy for ScopePolicy
fn evaluate<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_exchange: &'life1 mut Exchange,
auth: &'life2 AuthContext<'life3>,
) -> Pin<Box<dyn Future<Output = Result<AuthorizationDecision, CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Auto Trait Implementations§
impl Freeze for ScopePolicy
impl RefUnwindSafe for ScopePolicy
impl Send for ScopePolicy
impl Sync for ScopePolicy
impl Unpin for ScopePolicy
impl UnsafeUnpin for ScopePolicy
impl UnwindSafe for ScopePolicy
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
Mutably borrows from an owned value. Read more