Commit d1e49f6d authored by shishir suman's avatar shishir suman
Browse files

reverting fix for concurrent modification exception

Showing with 1 addition and 2 deletions
+1 -2
...@@ -52,8 +52,6 @@ public class AccessTokenValidator { ...@@ -52,8 +52,6 @@ public class AccessTokenValidator {
@Autowired @Autowired
private RedisUtil redisUtil; private RedisUtil redisUtil;
private List<String> userRoleList = Arrays.asList(userRoles.split(","));
public String verifyUserToken(String token, boolean checkActive, String uri) { public String verifyUserToken(String token, boolean checkActive, String uri) {
String userId = Constants.Parameters.UNAUTHORIZED; String userId = Constants.Parameters.UNAUTHORIZED;
try { try {
...@@ -79,6 +77,7 @@ public class AccessTokenValidator { ...@@ -79,6 +77,7 @@ public class AccessTokenValidator {
log.error("Missing Appropriate Roles."); log.error("Missing Appropriate Roles.");
return Constants.Parameters.UNAUTHORIZED; return Constants.Parameters.UNAUTHORIZED;
} }
List<String> userRoleList = Arrays.asList(userRoles.split(","));
boolean roleMatches = roles.stream().anyMatch(x -> userRoleList.contains(x.toLowerCase())); boolean roleMatches = roles.stream().anyMatch(x -> userRoleList.contains(x.toLowerCase()));
log.debug("Role matched - {}", roleMatches); log.debug("Role matched - {}", roleMatches);
if(roleMatches) { if(roleMatches) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment