refactor(security): replace string literal with constant key
This commit is contained in:
		
					parent
					
						
							
								61d72684c9
							
						
					
				
			
			
				commit
				
					
						8e7b0770de
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -83,7 +83,7 @@ class KeycloakSecurityConfig { | ||||||
|         jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(jwt -> { |         jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(jwt -> { | ||||||
|             List<GrantedAuthority> grantedAuthorities = new ArrayList<>(); |             List<GrantedAuthority> grantedAuthorities = new ArrayList<>(); | ||||||
| 
 | 
 | ||||||
|             Map<String, Object> realmAccess = jwt.getClaim("realm_access"); |             Map<String, Object> realmAccess = jwt.getClaim(REALM_ACCESS_CLAIM); | ||||||
|             if (realmAccess != null && realmAccess.containsKey("roles")) { |             if (realmAccess != null && realmAccess.containsKey("roles")) { | ||||||
|                 List<String> roles = (List<String>) realmAccess.get("roles"); |                 List<String> roles = (List<String>) realmAccess.get("roles"); | ||||||
|                 for (String role : roles) { |                 for (String role : roles) { | ||||||
|  |  | ||||||
		Reference in a new issue