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 b03f00a..79054eb 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 @@ -22,8 +22,10 @@ public class Constants { public static final String OPENID = "openid"; public static final String REDIRECT_URI = "redirect_uri"; public static final String REDIRECT_URIS = "redirect_uris"; + public static final String RESPONSE_TYPE = "response_type"; public static final String SCOPE = "scope"; public static final String SECRET = "secret"; public static final String STATE = "state"; + public static final String TOKEN = "token"; public static final String TOKEN_TYPE = "token_type"; } diff --git a/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/PathHandler.java b/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/PathHandler.java index 5f6c042..989e228 100644 --- a/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/PathHandler.java +++ b/de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/PathHandler.java @@ -40,6 +40,14 @@ public abstract class PathHandler implements HttpHandler { } } + public static boolean badRequest(HttpExchange ex, byte[] bytes) throws IOException { + return sendContent(ex, HTTP_BAD_REQUEST, bytes); + } + + public static boolean badRequest(HttpExchange ex, Object o) throws IOException { + return sendContent(ex, HTTP_BAD_REQUEST, o); + } + public Bond bindPath(String... path) { return new Bond(path); } @@ -153,13 +161,4 @@ public abstract class PathHandler implements HttpHandler { public static boolean sendContent(HttpExchange ex, Object o) throws IOException { return sendContent(ex, HTTP_OK, o); } - - - public static boolean badRequest(HttpExchange ex, byte[] bytes) throws IOException { - return sendContent(ex, HTTP_BAD_REQUEST, bytes); - } - - public static boolean badRequest(HttpExchange ex, Object o) throws IOException { - return sendContent(ex, HTTP_BAD_REQUEST, o); - } }