Skip to content

Commit 188bdf6

Browse files
authored
Update README.md
Have authenticationConverter use the AuthoritiesConverter interface
1 parent ea78a2a commit 188bdf6

File tree

1 file changed

+1
-1
lines changed
  • spring-boot-modules/spring-boot-keycloak

1 file changed

+1
-1
lines changed

spring-boot-modules/spring-boot-keycloak/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ The <em>AuthoritiesConverter</em> interface is a tip for the bean factory becaus
247247
As we configured Keycloak as an OpenID Provider by providing just its <em>issuer-uri</em>, what we get as input in the <em>GrantedAuthoritiesMapper</em> are <em>OidcUserAuthority</em> instances:
248248
<pre><code class="language-java">@Bean
249249
GrantedAuthoritiesMapper authenticationConverter(
250-
Converter&lt;Map&lt;String, Object&gt;, Collection&lt;GrantedAuthority&gt;&gt; realmRolesAuthoritiesConverter) {
250+
AuthoritiesConverter realmRolesAuthoritiesConverter) {
251251
return (authorities) -&gt; authorities.stream().filter(authority -&gt; authority instanceof OidcUserAuthority)
252252
.map(OidcUserAuthority.class::cast).map(OidcUserAuthority::getIdToken).map(OidcIdToken::getClaims)
253253
.map(realmRolesAuthoritiesConverter::convert)

0 commit comments

Comments
 (0)