commit 9829bc62c781cffa95d1d738b4257ec83f65256b
parent 331a2edf501a02cce69eebb8689019c86e6caf97
Author: Henrique Chan Carvalho Machado <henriqueccmachado@tecnico.ulisboa.pt>
Date: Tue, 9 Dec 2025 12:06:05 +0100
oauth2_gateway: change token request type from json to x-www-form-urlencoded
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/oauth2_gateway/src/handlers.rs b/oauth2_gateway/src/handlers.rs
@@ -3,6 +3,7 @@ use axum::{
extract::{Path, Query, State},
http::{StatusCode, header},
response::IntoResponse,
+ Form,
};
use chrono::Utc;
use serde_json::json;
@@ -373,7 +374,7 @@ fn build_presentation_definition(scope: &str) -> PresentationDefinition {
// POST /token
pub async fn token(
State(state): State<AppState>,
- Json(request): Json<TokenRequest>,
+ Form(request): Form<TokenRequest>,
) -> Result<impl IntoResponse, (StatusCode, Json<ErrorResponse>)> {
tracing::info!("Token request for code: {}", request.code);