Browse Source

minor changes

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
sqlite
Stephan Richter 4 months ago
parent
commit
24306fd5b8
  1. 2
      de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/Constants.java
  2. 17
      de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/PathHandler.java

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

@ -22,8 +22,10 @@ public class Constants { @@ -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";
}

17
de.srsoftware.oidc.api/src/main/java/de/srsoftware/oidc/api/PathHandler.java

@ -40,6 +40,14 @@ public abstract class PathHandler implements HttpHandler { @@ -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 { @@ -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);
}
}

Loading…
Cancel
Save