Skip to main content

AuthDecider

Trait AuthDecider 

Source
pub trait AuthDecider: Send + Sync {
    // Required method
    fn decide<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        req: &'life1 RequestParts<'life2>,
    ) -> Pin<Box<dyn Future<Output = Decision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

The per-request authorization gate.

Implemented by the embedder for its forward-auth / policy-decision logic (e.g. JWT verification + a policy engine + header translation). Called inline on every proxied request and by the /verify forward-auth endpoint: same trait, two call sites.

Required Methods§

Source

fn decide<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, req: &'life1 RequestParts<'life2>, ) -> Pin<Box<dyn Future<Output = Decision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Decide whether to allow, deny, or redirect the request.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§