Skip to content

Commit d5e5ac0

Browse files
committed
Add JavaDoc to reactive oauth2ResourceServer
1 parent fbf6d22 commit d5e5ac0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,23 @@ private ReactiveOAuth2AuthorizedClientService getAuthorizedClientService() {
11211121
private OAuth2ClientSpec() {}
11221122
}
11231123

1124+
/**
1125+
* Configures OAuth 2.0 Resource Server support.
1126+
*
1127+
* <pre class="code">
1128+
* &#064;Bean
1129+
* public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
1130+
* http
1131+
* // ...
1132+
* .oauth2ResourceServer()
1133+
* .jwt()
1134+
* .publicKey(publicKey());
1135+
* return http.build();
1136+
* }
1137+
* </pre>
1138+
*
1139+
* @return the {@link OAuth2ResourceServerSpec} to customize
1140+
*/
11241141
public OAuth2ResourceServerSpec oauth2ResourceServer() {
11251142
if (this.resourceServer == null) {
11261143
this.resourceServer = new OAuth2ResourceServerSpec();
@@ -1199,13 +1216,23 @@ public OAuth2ResourceServerSpec authenticationManagerResolver(
11991216
return this;
12001217
}
12011218

1219+
/**
1220+
* Enables JWT Resource Server support.
1221+
*
1222+
* @return the {@link JwtSpec} for additional configuration
1223+
*/
12021224
public JwtSpec jwt() {
12031225
if (this.jwt == null) {
12041226
this.jwt = new JwtSpec();
12051227
}
12061228
return this.jwt;
12071229
}
12081230

1231+
/**
1232+
* Enables Opaque Token Resource Server support.
1233+
*
1234+
* @return the {@link OpaqueTokenSpec} for additional configuration
1235+
*/
12091236
public OpaqueTokenSpec opaqueToken() {
12101237
if (this.opaqueToken == null) {
12111238
this.opaqueToken = new OpaqueTokenSpec();

0 commit comments

Comments
 (0)