Browse Source

implemented sending media type on token request (and others)

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
main
Stephan Richter 1 month ago
parent
commit
7da96e98b0
  1. 1
      de.srsoftware.http/src/main/java/de/srsoftware/http/PathHandler.java
  2. 1
      de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/UserController.java

1
de.srsoftware.http/src/main/java/de/srsoftware/http/PathHandler.java

@ -178,6 +178,7 @@ public abstract class PathHandler implements HttpHandler {
if (o instanceof List<?> list) o = new JSONArray(list); if (o instanceof List<?> list) o = new JSONArray(list);
if (o instanceof Map<?, ?> map) o = new JSONObject(map); if (o instanceof Map<?, ?> map) o = new JSONObject(map);
if (o instanceof Error<?> error) o = error.json(); if (o instanceof Error<?> error) o = error.json();
if (o instanceof JSONObject) ex.getResponseHeaders().add(CONTENT_TYPE, JSON);
return sendContent(ex, status, o.toString().getBytes(UTF_8)); return sendContent(ex, status, o.toString().getBytes(UTF_8));
} }

1
de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/UserController.java

@ -21,7 +21,6 @@ import jakarta.mail.*;
import jakarta.mail.internet.*; import jakarta.mail.internet.*;
import java.io.IOException; import java.io.IOException;
import java.time.Duration; import java.time.Duration;
import java.util.Comparator;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;

Loading…
Cancel
Save