pub struct login;Expand description
Handles the login endpoint, verifying credentials and creating session tokens.
§Arguments
request- A reference to the Actix webHttpRequestobject.config- Configuration data for the application.fernet- Fernet object to encrypt the auth payload that will be set assession_tokencookie.session- Session struct that holds thesession_mappingandsession_trackerto handle sessions.
§Returns
200- HttpResponse with asession_tokenand redirect URL to the/homeentrypoint.401- HttpResponse with an error message for failed authentication.
Trait Implementations§
source§impl HttpServiceFactory for login
impl HttpServiceFactory for login
fn register(self, __config: &mut AppService)
Auto Trait Implementations§
impl Freeze for login
impl RefUnwindSafe for login
impl Send for login
impl Sync for login
impl Unpin for login
impl UnwindSafe for login
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