Skip to content

Commit

Permalink
Usage base64 encoded password as expected by JJWT
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-g committed Jun 13, 2018
1 parent e5ec2c1 commit 81aac93
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.jsonwebtoken.Jwt;
import io.jsonwebtoken.JwtException;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.impl.TextCodec;
import org.apache.commons.lang3.StringUtils;
import org.owasp.webgoat.assignments.AssignmentEndpoint;
import org.owasp.webgoat.assignments.AssignmentHints;
Expand All @@ -25,7 +26,6 @@
import java.time.Instant;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import static java.util.Comparator.comparingLong;
import static java.util.Optional.ofNullable;
Expand All @@ -39,7 +39,7 @@
@AssignmentHints({"jwt-change-token-hint1", "jwt-change-token-hint2", "jwt-change-token-hint3", "jwt-change-token-hint4", "jwt-change-token-hint5"})
public class JWTVotesEndpoint extends AssignmentEndpoint {

public static final String JWT_PASSWORD = "victory";
public static final String JWT_PASSWORD = TextCodec.BASE64.encode("victory");
private static String validUsers = "TomJerrySylvester";

private static int totalVotes = 38929;
Expand Down

0 comments on commit 81aac93

Please sign in to comment.