Skip to content

Commit

Permalink
As something initialized via constructor, the field cannot be static
Browse files Browse the repository at this point in the history
  • Loading branch information
aaime committed Aug 14, 2018
1 parent e3d75a1 commit 8be7251
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/ */
public class GeoServerUserAuthenticationConverter extends DefaultUserAuthenticationConverter { public class GeoServerUserAuthenticationConverter extends DefaultUserAuthenticationConverter {


private static Object USERNAME_KEY = USERNAME; private Object usernameKey = USERNAME;


/** /**
* Default Constructor. * Default Constructor.
Expand All @@ -42,13 +42,13 @@ public GeoServerUserAuthenticationConverter() {
public GeoServerUserAuthenticationConverter(final String username_key) { public GeoServerUserAuthenticationConverter(final String username_key) {
super(); super();


USERNAME_KEY = username_key; usernameKey = username_key;
} }


@Override @Override
public Authentication extractAuthentication(Map<String, ?> map) { public Authentication extractAuthentication(Map<String, ?> map) {
if (map.containsKey(USERNAME_KEY)) { if (map.containsKey(usernameKey)) {
return new UsernamePasswordAuthenticationToken(map.get(USERNAME_KEY), "N/A", null); return new UsernamePasswordAuthenticationToken(map.get(usernameKey), "N/A", null);
} }
return null; return null;
} }
Expand Down

0 comments on commit 8be7251

Please sign in to comment.