Merge remote-tracking branch 'origin/pr/1042'

master
Andrew DeMaria 6 years ago
commit cdd307d86f
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 5
      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; import java.util.Collection;
public class JWTAuthenticationToken extends AbstractAuthenticationToken { public class JWTAuthenticationToken extends AbstractAuthenticationToken {
private final String token; private final String token;
private String requestedPath; private String requestedPath;
public static final String USERNAME_ANONYMOUS = "anonymous";
public JWTAuthenticationToken(Collection<? extends GrantedAuthority> authorities, String token, String requestedPath) { public JWTAuthenticationToken(Collection<? extends GrantedAuthority> authorities, String token, String requestedPath) {
super(authorities); super(authorities);
this.token = token; this.token = token;
@ -22,7 +25,7 @@ public class JWTAuthenticationToken extends AbstractAuthenticationToken {
@Override @Override
public Object getPrincipal() { public Object getPrincipal() {
return "GERNIC_JWT_PRINICPLE"; return USERNAME_ANONYMOUS;
} }
public String getRequestedPath() { public String getRequestedPath() {

Loading…
Cancel
Save