pub struct RolePolicy { /* private fields */ }Expand description
Role-based access control policy.
Reads the authenticated principal from the AuthContext (never from raw
Exchange properties) and evaluates whether it holds the required roles.
When all_required is true, every listed role must be present.
When all_required is false, at least one listed role must be present.
Implementations§
Trait Implementations§
Source§impl SecurityPolicy for RolePolicy
impl SecurityPolicy for RolePolicy
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 RolePolicy
impl RefUnwindSafe for RolePolicy
impl Send for RolePolicy
impl Sync for RolePolicy
impl Unpin for RolePolicy
impl UnsafeUnpin for RolePolicy
impl UnwindSafe for RolePolicy
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