Struct mailpot_web::auth::auth_request::Login
source · pub struct Login<UserId, User, ResBody, Role = ()> {
login_url: Option<Arc<Cow<'static, str>>>,
redirect_field_name: Option<Arc<Cow<'static, str>>>,
role_bounds: Box<dyn RoleBounds<Role>>,
_user_id_type: PhantomData<UserId>,
_user_type: PhantomData<User>,
_body_type: PhantomData<fn() -> ResBody>,
}
Expand description
Type that performs login authorization.
See RequireAuthorizationLayer::login
for more details.
Fields§
§login_url: Option<Arc<Cow<'static, str>>>
§redirect_field_name: Option<Arc<Cow<'static, str>>>
§role_bounds: Box<dyn RoleBounds<Role>>
§_user_id_type: PhantomData<UserId>
§_user_type: PhantomData<User>
§_body_type: PhantomData<fn() -> ResBody>
Trait Implementations§
source§impl<UserId, User, ReqBody, ResBody, Role> AuthorizeRequest<ReqBody> for Login<UserId, User, ResBody, Role>where
Role: PartialOrd + PartialEq + Clone + Send + Sync + 'static,
User: AuthUser<UserId, Role>,
ResBody: HttpBody + Default,
impl<UserId, User, ReqBody, ResBody, Role> AuthorizeRequest<ReqBody> for Login<UserId, User, ResBody, Role>where Role: PartialOrd + PartialEq + Clone + Send + Sync + 'static, User: AuthUser<UserId, Role>, ResBody: HttpBody + Default,
§type ResponseBody = ResBody
type ResponseBody = ResBody
The body type used for responses to unauthorized requests.
Authorize the request. Read more