Function auth_layer_fn

Source
pub async fn auth_layer_fn(
    __arg0: State<AppState>,
    req: Request,
    next: Next,
) -> Response
Expand description

Middleware function. Wire via axum::middleware::from_fn_with_state because the router’s state is needed for the auth layer reference.