Updated axios request object, added minio

This commit is contained in:
Benjamin Sherriff
2023-10-19 16:55:13 -04:00
parent 55b8b1a0e3
commit f46748167c
9 changed files with 65 additions and 18 deletions

View File

@@ -98,11 +98,13 @@ async fn login(request: web::Json<LoginRequest>) -> HttpResponse {
.path("/")
.max_age(Duration::new(access_token_max_age * 60, 0))
.http_only(true)
.secure(true)
.finish();
let refresh_cookie = Cookie::build("refresh_token", refresh_token_details.token.clone().unwrap())
.path("/")
.max_age(Duration::new(refresh_token_max_age * 60, 0))
.http_only(true)
.secure(true)
.finish();
let logged_in_cookie = Cookie::build("logged_in", "true")
.path("/")
@@ -210,6 +212,7 @@ async fn refresh(req: HttpRequest) -> HttpResponse {
.path("/")
.max_age(Duration::new(access_token_max_age * 60, 0))
.http_only(true)
.secure(true)
.finish();
let logged_in_cookie = Cookie::build("logged_in", "true")
.path("/")
@@ -254,6 +257,7 @@ async fn refresh(req: HttpRequest) -> HttpResponse {
.path("/")
.max_age(Duration::new(refresh_token_max_age * 60, 0))
.http_only(true)
.secure(true)
.finish();
HttpResponse::Ok()