all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Shannon Sterz <s.sterz@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox 1/1] auth-api: include meta information required by extjs in api endpoints
Date: Wed, 16 Jul 2025 00:40:41 +0200	[thread overview]
Message-ID: <29a30c55-c367-4150-90d3-3477065e50f2@proxmox.com> (raw)
In-Reply-To: <20250710135010.305861-2-s.sterz@proxmox.com>

Am 10.07.25 um 15:50 schrieb Shannon Sterz:
> otherwise extjs will assume the requests failed even though they were
> successful.

Potentially dumb question, but is this then only returning that for the
extjs formatter or also for the json one?

> 
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
>  proxmox-auth-api/src/api/access.rs | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/proxmox-auth-api/src/api/access.rs b/proxmox-auth-api/src/api/access.rs
> index fdf52185..f5111d4a 100644
> --- a/proxmox-auth-api/src/api/access.rs
> +++ b/proxmox-auth-api/src/api/access.rs
> @@ -6,7 +6,6 @@ use http::Response;
>  use openssl::hash::MessageDigest;
>  use serde_json::{json, Value};
>  
> -use proxmox_http::Body;
>  use proxmox_rest_server::{extract_cookie, RestEnvironment};
>  use proxmox_router::{
>      http_err, ApiHandler, ApiMethod, ApiResponseFuture, Permission, RpcEnvironment,
> @@ -93,7 +92,11 @@ fn logout_handler(
>  
>          Ok(Response::builder()
>              .header(hyper::header::SET_COOKIE, host_cookie)
> -            .body(Body::empty())?)
> +            .body(
> +                json!({"data": {}, "status": 200, "success": true })
> +                    .to_string()
> +                    .into(),
> +            )?)
>      })
>  }
>  
> @@ -179,7 +182,11 @@ fn create_ticket_http_only(
>              }
>          }
>  
> -        Ok(response.body(json!({"data": ticket_response }).to_string().into())?)
> +        Ok(response.body(
> +            json!({"data": ticket_response, "status": 200, "success": true })
> +                .to_string()
> +                .into(),
> +        )?)
>      })
>  }
>  



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  reply	other threads:[~2025-07-15 22:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10 13:50 [pbs-devel] [PATCH proxmox{, -backup} 0/4] http only cookie based tickets for pbs Shannon Sterz
2025-07-10 13:50 ` [pbs-devel] [PATCH proxmox 1/1] auth-api: include meta information required by extjs in api endpoints Shannon Sterz
2025-07-15 22:40   ` Thomas Lamprecht [this message]
     [not found]     ` <DBDBXGTI71WP.3V2J3DEMNK1DL@proxmox.com>
2025-07-22 20:21       ` Thomas Lamprecht
2025-07-23 15:18         ` Shannon Sterz
2025-07-10 13:50 ` [pbs-devel] [PATCH proxmox-backup 1/3] api: access: add opt-in http only ticket authentication flow Shannon Sterz
2025-07-23 12:57   ` Mira Limbeck
2025-07-23 13:58   ` Maximiliano Sandoval
2025-07-10 13:50 ` [pbs-devel] [PATCH proxmox-backup 2/3] ui: opt into the new http-only " Shannon Sterz
2025-07-10 13:50 ` [pbs-devel] [PATCH proxmox-backup 3/3] client: adapt pbs client to also handle http-only flows correctly Shannon Sterz
2025-07-23 12:56 ` [pbs-devel] [PATCH proxmox{, -backup} 0/4] http only cookie based tickets for pbs Mira Limbeck
2025-07-23 14:05 ` Maximiliano Sandoval
2025-07-23 15:15 ` Shannon Sterz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29a30c55-c367-4150-90d3-3477065e50f2@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=s.sterz@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal