You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-security.adoc
+14-17Lines changed: 14 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -201,8 +201,21 @@ For JWT configuration, a JWK Set URI or OIDC Issuer URI needs to be specified, a
201
201
NOTE: If the authorization server does not support a JWK Set URI, you can configure the resource server with the Public Key used for verifying the signature of the JWT.
202
202
This can be done using the configprop:spring.security.oauth2.resourceserver.jwt.public-key-location[] property, where the value needs to point to a file containing the public key in the PEM-encoded x509 format.
203
203
204
-
The same properties are applicable for both servlet and reactive applications.
204
+
The configprop:spring.security.oauth2.resourceserver.jwt.audiences[] property can be used to specifify the expected values of the aud claim in JWTs.
205
+
For example, to require JWTs to contain an aud claim with the value `my-audience`:
The same properties are applicable for both servlet and reactive applications.
206
219
Alternatively, you can define your own `JwtDecoder` bean for servlet applications or a `ReactiveJwtDecoder` for reactive applications.
207
220
208
221
In cases where opaque tokens are used instead of JWTs, you can configure the following properties to validate tokens through introspection:
@@ -220,25 +233,9 @@ In cases where opaque tokens are used instead of JWTs, you can configure the fol
220
233
----
221
234
222
235
Again, the same properties are applicable for both servlet and reactive applications.
223
-
224
236
Alternatively, you can define your own `OpaqueTokenIntrospector` bean for servlet applications or a `ReactiveOpaqueTokenIntrospector` for reactive applications.
225
237
226
-
To enable audience validation, set the `configprop:spring.security.oauth2.resourceserver.jwt.audiences[]` property in your Spring Boot application
227
-
configuration file. This property specifies the expected value(s) of the aud claim in JWTs.
228
-
229
-
For example, to expect the JWTs to contain an aud claim with the value `my-audience`, you can add the following line to your
0 commit comments