fn add_refresh_cookie(
    settings: Arc<Settings>,
    refresh_token: &str,
    response: response::Builder,
) -> response::Builder {
    let mut refresh_cookie = cookie::Cookie::build(&settings.refresh_cookie, refresh_token)
        .http_only(true)
        .path(&settings.cookie_path)
        .secure(settings.cookie_secure);
    if let Some(cookie_domain) = &settings.cookie_domain {
        refresh_cookie = refresh_cookie.domain(cookie_domain);
    }
    response.header(header::SET_COOKIE, refresh_cookie.finish().to_string())
}
// Add a new refresh cookie to the response
Add a new refresh cookie to the response
Add a new refresh cookie to the response
fn add_refresh_cookie(
    settings: Arc<Settings>,
    refresh_token: &str,
    response: response::Builder,
) -> response::Builder {
    let mut refresh_cookie = cookie::Cookie::build(&settings.refresh_cookie, refresh_token)
        .http_only(true)
        .path(&settings.cookie_path)
        .secure(settings.cookie_secure);
    if let Some(cookie_domain) = &settings.cookie_domain {
        refresh_cookie = refresh_cookie.domain(cookie_domain);
    }
    response.header(header::SET_COOKIE, refresh_cookie.finish().to_string())
}
fn add_refresh_cookie ( settings : Arc < Settings > , refresh_token : & str , response : response :: Builder , ) -> response :: Builder { let mut refresh_cookie = cookie :: Cookie :: build ( & settings . refresh_cookie , refresh_token ) . http_only ( true ) . path ( & settings . cookie_path ) . secure ( settings . cookie_secure ) ; if let Some ( cookie_domain ) = & settings . cookie_domain { refresh_cookie = refresh_cookie . domain ( cookie_domain ) ; } response . header ( header :: SET_COOKIE , refresh_cookie . finish ( ) . to_string ( ) ) }
Add a new refresh cookie to the response
Add a new refresh cookie to the response
settings
Arc<Settings>
refresh_token
&str
response
response::Builder
settings
Arc<Settings>
refresh_token
&str
response
response::Builder