Trait wasm_service_oauth::AuthCheck[][src]

pub trait AuthCheck {
#[must_use]    fn check_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        req: &'life1 Request,
        ctx: &'life2 mut Context,
        user: &'life3 UserData
    ) -> Pin<Box<dyn Future<Output = Result<(), HandlerReturn>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]fn check_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    req: &'life1 Request,
    ctx: &'life2 mut Context,
    user: &'life3 UserData
) -> Pin<Box<dyn Future<Output = Result<(), HandlerReturn>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Determine whether user is authorized for the url/action within the app. Returns OK if the user is authorized to perform the request, If not authorized, handler can either set ctx to redirect, or return an error page in HandlerReturn

Loading content...

Implementors

impl AuthCheck for AlwaysAllow[src]

impl AuthCheck for AlwaysDeny[src]

impl AuthCheck for UserAllowList[src]

Loading content...