Skip to content

Commit 8f49ca8

Browse files
bdemersrwinch
authored andcommitted
Fixing IllegalStateException message in OAuth2ResourceServerConfigurer
Updated message to include `http.oauth2ResourceServer()`
1 parent adb9f4e commit 8f49ca8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ public void configure(H http) throws Exception {
183183
if ( this.jwtConfigurer == null ) {
184184
throw new IllegalStateException("Jwt is the only supported format for bearer tokens " +
185185
"in Spring Security and no Jwt configuration was found. Make sure to specify " +
186-
"a jwk set uri by doing http.oauth2().resourceServer().jwt().jwkSetUri(uri), or wire a " +
187-
"JwtDecoder instance by doing http.oauth2().resourceServer().jwt().decoder(decoder), or " +
188-
"expose a JwtDecoder instance as a bean and do http.oauth2().resourceServer().jwt().");
186+
"a jwk set uri by doing http.oauth2ResourceServer().jwt().jwkSetUri(uri), or wire a " +
187+
"JwtDecoder instance by doing http.oauth2ResourceServer().jwt().decoder(decoder), or " +
188+
"expose a JwtDecoder instance as a bean and do http.oauth2ResourceServer().jwt().");
189189
}
190190

191191
JwtDecoder decoder = this.jwtConfigurer.getJwtDecoder();

0 commit comments

Comments
 (0)