Skip to content

Commit bd10ebe

Browse files
update docs
1 parent b06c40d commit bd10ebe

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/modules/ROOT/pages/servlet/oauth2/resource-server/jwt.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ Next, let's see the architectural components that Spring Security uses to suppor
8989
javadoc:org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider[] is an xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationprovider[`AuthenticationProvider`] implementation that leverages a <<oauth2resourceserver-jwt-decoder,`JwtDecoder`>> and <<oauth2resourceserver-jwt-authorization-extraction,`JwtAuthenticationConverter`>> to authenticate a JWT.
9090

9191
Let's take a look at how `JwtAuthenticationProvider` works within Spring Security.
92-
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> works.
92+
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from xref:servlet/oauth2/resource-server/index.adoc#oauth2resourceserver-authentication-bearertokenauthenticationfilter[Reading the Bearer Token] works.
9393

9494
.`JwtAuthenticationProvider` Usage
9595
image::{figures}/jwtauthenticationprovider.png[]
9696

97-
image:{icondir}/number_1.png[] The authentication `Filter` from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> passes a `BearerTokenAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].
97+
image:{icondir}/number_1.png[] The authentication `Filter` from xref:servlet/oauth2/resource-server/index.adoc#oauth2resourceserver-authentication-bearertokenauthenticationfilter[Reading the Bearer Token] passes a `BearerTokenAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].
9898

9999
image:{icondir}/number_2.png[] The `ProviderManager` is configured to use an xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationprovider[AuthenticationProvider] of type `JwtAuthenticationProvider`.
100100

@@ -974,6 +974,7 @@ Java::
974974
public JwtAuthenticationConverter jwtAuthenticationConverter() {
975975
JwtGrantedAuthoritiesConverter grantedAuthoritiesConverter = new JwtGrantedAuthoritiesConverter();
976976
grantedAuthoritiesConverter.setAuthoritiesClaimName("authorities");
977+
grantedAuthoritiesConverter.setAuthoritiesClaimDelimiter(",");
977978
978979
JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter();
979980
jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(grantedAuthoritiesConverter);
@@ -989,6 +990,7 @@ Kotlin::
989990
fun jwtAuthenticationConverter(): JwtAuthenticationConverter {
990991
val grantedAuthoritiesConverter = JwtGrantedAuthoritiesConverter()
991992
grantedAuthoritiesConverter.setAuthoritiesClaimName("authorities")
993+
grantedAuthoritiesConverter.setAuthoritiesClaimDelimiter(",")
992994
993995
val jwtAuthenticationConverter = JwtAuthenticationConverter()
994996
jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter(grantedAuthoritiesConverter)
@@ -1017,6 +1019,7 @@ Xml::
10171019
<bean id="jwtGrantedAuthoritiesConverter"
10181020
class="org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter">
10191021
<property name="authoritiesClaimName" value="authorities"/>
1022+
<property name="authoritiesClaimDelimiter" value=","/>
10201023
</bean>
10211024
----
10221025
======

docs/modules/ROOT/pages/servlet/oauth2/resource-server/opaque-token.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ Next, let's see the architectural components that Spring Security uses to suppor
8585
javadoc:org.springframework.security.oauth2.server.resource.authentication.OpaqueTokenAuthenticationProvider[] is an xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationprovider[`AuthenticationProvider`] implementation that leverages a <<oauth2resourceserver-opaque-introspector,`OpaqueTokenIntrospector`>> to authenticate an opaque token.
8686

8787
Let's take a look at how `OpaqueTokenAuthenticationProvider` works within Spring Security.
88-
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> works.
88+
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from xref:servlet/oauth2/resource-server/index.adoc#oauth2resourceserver-authentication-bearertokenauthenticationfilter[Reading the Bearer Token] works.
8989

9090
.`OpaqueTokenAuthenticationProvider` Usage
9191
image::{figures}/opaquetokenauthenticationprovider.png[]
9292

93-
image:{icondir}/number_1.png[] The authentication `Filter` from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> passes a `BearerTokenAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].
93+
image:{icondir}/number_1.png[] The authentication `Filter` from xref:servlet/oauth2/resource-server/index.adoc#oauth2resourceserver-authentication-bearertokenauthenticationfilter[Reading the Bearer Token] passes a `BearerTokenAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].
9494

9595
image:{icondir}/number_2.png[] The `ProviderManager` is configured to use an xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationprovider[AuthenticationProvider] of type `OpaqueTokenAuthenticationProvider`.
9696

0 commit comments

Comments
 (0)