pub trait AuthZResolverClient: Send + Sync {
// Required method
fn evaluate<'life0, 'async_trait>(
&'life0 self,
request: EvaluationRequest,
) -> Pin<Box<dyn Future<Output = Result<EvaluationResponse, AuthZResolverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Public API trait for the AuthZ resolver gateway.
This trait is registered in ClientHub by the module and
can be consumed by other modules acting as PEPs:
ⓘ
let authz = hub.get::<dyn AuthZResolverClient>()?;
let response = authz.evaluate(request).await?;Required Methods§
Sourcefn evaluate<'life0, 'async_trait>(
&'life0 self,
request: EvaluationRequest,
) -> Pin<Box<dyn Future<Output = Result<EvaluationResponse, AuthZResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn evaluate<'life0, 'async_trait>(
&'life0 self,
request: EvaluationRequest,
) -> Pin<Box<dyn Future<Output = Result<EvaluationResponse, AuthZResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Evaluate an authorization request.
Returns a decision (allow/deny) with optional row-level constraints.
§Errors
Deniedif the PDP explicitly denies accessNoPluginAvailableif noAuthZplugin is registeredServiceUnavailableif the plugin is not readyInternalfor unexpected errors