File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
config/src/test/java/org/springframework/security/config/web/server Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,19 @@ public void getWhenExpiredThenReturnsInvalidToken() {
178
178
// @formatter:on
179
179
}
180
180
181
+ @ Test
182
+ public void getWhenBearerMissingInvalidToken () {
183
+ this .spring .register (PublicKeyConfig .class ).autowire ();
184
+ // @formatter:off
185
+ this .client .get ()
186
+ .headers ((headers ) -> headers
187
+ .set ("Authorization" , "" ))
188
+ .exchange ()
189
+ .expectStatus ().isUnauthorized ()
190
+ .expectHeader ().value (HttpHeaders .WWW_AUTHENTICATE , startsWith ("Bearer error=\" missing_token\" " ));
191
+ // @formatter:on
192
+ }
193
+
181
194
@ Test
182
195
public void getWhenUnsignedThenReturnsInvalidToken () {
183
196
this .spring .register (PublicKeyConfig .class ).autowire ();
You can’t perform that action at this time.
0 commit comments