From 813f3d28982ee1c583caf1218be7058760bc15b2 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Sun, 20 Oct 2024 16:53:03 +0200 Subject: [PATCH] debugging Signed-off-by: Stephan Richter --- .../src/main/java/de/srsoftware/oidc/api/Constants.java | 2 +- .../main/java/de/srsoftware/oidc/backend/ClientController.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java b/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java index dbfd69f..743a75c 100644 --- a/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java +++ b/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java @@ -25,7 +25,7 @@ public class Constants { public static final String ERROR_LOCKED = "error_locked"; public static final String ERROR_LOGIN_FAILED = "error_login_failed"; public static final String ERROR_MISSING_PARAMETER = "error_missing_parameter"; - public static final String ERROR_MISSONG_CODE_RESPONSE_TYPE = "error_missing_code"; + public static final String ERROR_MISSING_CODE_RESPONSE_TYPE = "error_missing_code"; public static final String ERROR_NO_USERNAME = "error_no_username"; public static final String ERROR_UNKNOWN_CLIENT = "error_unknown_client"; public static final String ERROR_UNSUPPORTED_RESPONSE_TYPE = "error_unsupported_response_type"; diff --git a/de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/ClientController.java b/de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/ClientController.java index eff94a9..77278ab 100644 --- a/de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/ClientController.java +++ b/de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/ClientController.java @@ -38,6 +38,7 @@ public class ClientController extends Controller { if (optUser.isEmpty()) return invalidSessionUser(ex); var user = optUser.get(); var json = json(ex); + LOG.log(System.Logger.Level.WARNING,"json: {0}",json); var state = json.has(STATE) ? json.getString(STATE) : null; if (!json.has(CLIENT_ID)) return badRequest(ex, Error.message(ERROR_MISSING_PARAMETER, PARAM, CLIENT_ID, STATE, state)); var clientId = json.getString(CLIENT_ID); @@ -57,7 +58,7 @@ public class ClientController extends Controller { return badRequest(ex, Error.message(ERROR_UNSUPPORTED_RESPONSE_TYPE, RESPONSE_TYPE, responseType, STATE, state)); } } - if (!responseTypes.contains(CODE)) return badRequest(ex, Error.message(ERROR_MISSONG_CODE_RESPONSE_TYPE, STATE, state)); + if (!responseTypes.contains(CODE)) return badRequest(ex, Error.message(ERROR_MISSING_CODE_RESPONSE_TYPE, STATE, state)); var client = optClient.get(); var redirect = json.getString(REDIRECT_URI);