Browse Source

spotless

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
sqlite
Stephan Richter 7 months ago
parent
commit
6b7e0d2c97
  1. 4
      de.srsoftware.cookies/src/main/java/de/srsoftware/cookies/Cookie.java
  2. 6
      de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/TokenController.java

4
de.srsoftware.cookies/src/main/java/de/srsoftware/cookies/Cookie.java

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
/* © SRSoftware 2024 */
package de.srsoftware.cookies;
import static java.lang.System.Logger.Level.*;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import java.util.Arrays;
@ -8,8 +10,6 @@ import java.util.List; @@ -8,8 +10,6 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import static java.lang.System.Logger.Level.*;
public abstract class Cookie implements Map.Entry<String, String> {
static final System.Logger LOG = System.getLogger(SessionToken.class.getSimpleName());
private final String key;

6
de.srsoftware.oidc.backend/src/main/java/de/srsoftware/oidc/backend/TokenController.java

@ -11,8 +11,6 @@ import de.srsoftware.oidc.api.ClientService; @@ -11,8 +11,6 @@ import de.srsoftware.oidc.api.ClientService;
import de.srsoftware.oidc.api.PathHandler;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.stream.Collectors;
import org.jose4j.jws.AlgorithmIdentifiers;
@ -94,8 +92,8 @@ public class TokenController extends PathHandler { @@ -94,8 +92,8 @@ public class TokenController extends PathHandler {
// A JWT is a JWS and/or a JWE with JSON claims as the payload.
// In this example it is a JWS so we create a JsonWebSignature object.
JsonWebSignature jws = new JsonWebSignature();
if (secretBytes.length*8 < 256) {
LOG.log(WARNING,"Using secret with less than 256 bits! You will go to hell for this!");
if (secretBytes.length * 8 < 256) {
LOG.log(WARNING, "Using secret with less than 256 bits! You will go to hell for this!");
jws.setDoKeyValidation(false); // TODO: this is dangerous! Better: enforce key length of 256bits!
}

Loading…
Cancel
Save