pub trait Authorizer:
Send
+ Sync
+ 'static {
// Required method
fn authorize(
&self,
principal: &Principal,
action: &Action,
) -> impl Future<Output = Result<(), AuthError>> + Send;
}Expand description
Authorizes a resolved request. Separate from authentication so policy can evolve independently.
Required Methods§
Decides whether principal may perform action.
§Errors
Returns AuthError::Unauthorized if the action is not permitted.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".