macro_rules! predicate_required {
    ($predicate:expr, $alternative:expr) => { ... };
    ($predicate:expr, login_url = $login_url:expr, redirect_field = $redirect_field:expr) => { ... };
}
Expand description

Predicate middleware.

Can be specified with a login URL and next redirect field or an alternative which implements IntoResponse.

When the predicate passes, the request processes normally. On failure, either a redirect to the specified login URL is issued or the alternative is used as the response.