fn flash_redirect(&self, ok_redir: impl Into<String>, err_redir: impl Into<String>, cookies: &mut Cookies) -> Result<Redirect, Flash<Redirect>> {
        match self.authenticate() {
            Ok(cooky) => {
                let cid = Self::cookie_id();
                let contents = cooky.store_cookie();
                cookies.add_private(Cookie::new(cid, contents));
                Ok(Redirect::to(ok_redir.into()))
            },
            Err(fail) => {
                let mut furl = err_redir.into();
                if &fail.user != "" {
                    let furl_qrystr = Self::fail_url(&fail.user);
                    furl.push_str(&furl_qrystr);
                }
                Err( Flash::error(Redirect::to(furl), &fail.msg) )
            },
        }
    }
/// Redirect the user to one page on successful authentication or
/// another page (with a `FlashMessage` indicating why) if authentication fails.
/// 
/// `FlashMessage` is used to indicate why the authentication failed
/// this is so that the user can see why it failed but when they refresh
/// it will disappear, enabling a clean start, but with the user name
/// from the url's query string (determined by `fail_url()`)
Redirect the user to one page on successful authentication or
another page (with a `FlashMessage` indicating why) if authentication fails.

`FlashMessage` is used to indicate why the authentication failed
this is so that the user can see why it failed but when they refresh
it will disappear, enabling a clean start, but with the user name
from the url's query string (determined by `fail_url()`)
Redirect the user to one page on successful authentication or another page ( with a ` FlashMessage ` indicating why ) if authentication fails . ` FlashMessage ` is used to indicate why the authentication failed this is so that the user can see why it failed but when they refresh it will disappear enabling a clean start but with the user name from the url ' s query string ( determined by ` fail_url () ` )
fn flash_redirect(&self, ok_redir: impl Into<String>, err_redir: impl Into<String>, cookies: &mut Cookies) -> Result<Redirect, Flash<Redirect>> {
        match self.authenticate() {
            Ok(cooky) => {
                let cid = Self::cookie_id();
                let contents = cooky.store_cookie();
                cookies.add_private(Cookie::new(cid, contents));
                Ok(Redirect::to(ok_redir.into()))
            },
            Err(fail) => {
                let mut furl = err_redir.into();
                if &fail.user != "" {
                    let furl_qrystr = Self::fail_url(&fail.user);
                    furl.push_str(&furl_qrystr);
                }
                Err( Flash::error(Redirect::to(furl), &fail.msg) )
            },
        }
    }
fn flash_redirect ( & self , ok_redir : impl Into < String > , err_redir : impl Into < String > , cookies : & mut Cookies ) -> Result < Redirect , Flash < Redirect > > { match self . authenticate ( ) { Ok ( cooky ) => { let cid = Self :: cookie_id ( ) ; let contents = cooky . store_cookie ( ) ; cookies . add_private ( Cookie :: new ( cid , contents ) ) ; Ok ( Redirect :: to ( ok_redir . into ( ) ) ) } , Err ( fail ) => { let mut furl = err_redir . into ( ) ; if & fail . user != " " { let furl_qrystr = Self :: fail_url ( & fail . user ) ; furl . push_str ( & furl_qrystr ) ; } Err ( Flash :: error ( Redirect :: to ( furl ) , & fail . msg ) ) } , } }
Redirect the user to one page on successful authentication or
another page (with a `FlashMessage` indicating why) if authentication fails.
Redirect the user to one page on successful authentication or another page ( with a ` FlashMessage ` indicating why ) if authentication fails .
&self
ok_redir
impl Into<String>
err_redir
impl Into<String>
cookies
&mut Cookies
&self
ok_redir
impl Into<String>
err_redir
impl Into<String>
cookies
&mut Cookies