Browse Source

debugging

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
main
Stephan Richter 1 month ago
parent
commit
813f3d2898
  1. 2
      de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java
  2. 3
      de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/ClientController.java

2
de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java

@ -25,7 +25,7 @@ public class Constants { @@ -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";

3
de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/ClientController.java

@ -38,6 +38,7 @@ public class ClientController extends Controller { @@ -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 { @@ -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);

Loading…
Cancel
Save