pub fn protected(
check: impl Fn(&Request) -> bool + Send + Sync + 'static,
login: &str,
) -> impl MiddlewareExpand description
Protect routes: when check returns false the user is redirected to
login (with ?next= set) — or receives 401 for non-GET requests.