From f57ad3f27b100d30a89dca4ab7faeaebacab123a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Thomas?= Date: Mon, 29 Apr 2019 23:30:02 +0200 Subject: [PATCH] Fix typo in anonymous user name (#663) --- .../org/airsonic/player/security/JWTAuthenticationToken.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airsonic-main/src/main/java/org/airsonic/player/security/JWTAuthenticationToken.java b/airsonic-main/src/main/java/org/airsonic/player/security/JWTAuthenticationToken.java index 2dcf77ee..551ddef4 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/security/JWTAuthenticationToken.java +++ b/airsonic-main/src/main/java/org/airsonic/player/security/JWTAuthenticationToken.java @@ -6,9 +6,12 @@ import org.springframework.security.core.GrantedAuthority; import java.util.Collection; public class JWTAuthenticationToken extends AbstractAuthenticationToken { + private final String token; private String requestedPath; + public static final String USERNAME_ANONYMOUS = "anonymous"; + public JWTAuthenticationToken(Collection authorities, String token, String requestedPath) { super(authorities); this.token = token; @@ -22,7 +25,7 @@ public class JWTAuthenticationToken extends AbstractAuthenticationToken { @Override public Object getPrincipal() { - return "GERNIC_JWT_PRINICPLE"; + return USERNAME_ANONYMOUS; } public String getRequestedPath() {