Skip to content

Commit c79f3e1

Browse files
authored
Update SecurityConfig.java
Have authenticationConverter user AuthoritiesConverter
1 parent ea78a2a commit c79f3e1

File tree

1 file changed

+1
-2
lines changed
  • spring-boot-modules/spring-boot-keycloak/spring-boot-resource-server/src/main/java/com/baeldung/boot/keycloak/resourceserver

1 file changed

+1
-2
lines changed

spring-boot-modules/spring-boot-keycloak/spring-boot-resource-server/src/main/java/com/baeldung/boot/keycloak/resourceserver/SecurityConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ AuthoritiesConverter realmRolesAuthoritiesConverter() {
4242
}
4343

4444
@Bean
45-
JwtAuthenticationConverter authenticationConverter(
46-
Converter<Map<String, Object>, Collection<GrantedAuthority>> authoritiesConverter) {
45+
JwtAuthenticationConverter authenticationConverter(AuthoritiesConverter authoritiesConverter) {
4746
JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter();
4847
jwtAuthenticationConverter
4948
.setJwtGrantedAuthoritiesConverter(jwt -> authoritiesConverter.convert(jwt.getClaims()));

0 commit comments

Comments
 (0)