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
Auto Trait Implementations§
impl<UserId, User, ResBody, Role = ()> !RefUnwindSafe for Login<UserId, User, ResBody, Role>
impl<UserId, User, ResBody, Role> Send for Login<UserId, User, ResBody, Role>where User: Send, UserId: Send,
impl<UserId, User, ResBody, Role> Sync for Login<UserId, User, ResBody, Role>where User: Sync, UserId: Sync,
impl<UserId, User, ResBody, Role> Unpin for Login<UserId, User, ResBody, Role>where User: Unpin, UserId: Unpin,
impl<UserId, User, ResBody, Role = ()> !UnwindSafe for Login<UserId, User, ResBody, Role>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more