-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
in: webAn issue in web modules (web, webmvc)An issue in web modules (web, webmvc)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug
Milestone
Description
Describe the bug
ServerBearerTokenAuthenticationConverter throws exceptions in case
bearer token doesn't match pattern
or
authorization header and access token query param are both present in request.
To Reproduce
Send invalid bearer token in authorization header. For example, you can add test bellow to ServerBearerTokenAuthenticationConverterTests.
@Test
public void simpleTest() {
MockServerHttpRequest.BaseBuilder<?> request = MockServerHttpRequest
.get("/")
.header(HttpHeaders.AUTHORIZATION, "bearer !!");
assertThatCode(() -> this.converter.convert(MockServerWebExchange.from(request))).doesNotThrowAnyException();
}
Expected behavior
ServerBearerTokenAuthenticationConverter should signal error after subscribing to returned publisher not to throw error after calling convert method.
I'm able to submit a PR.
Metadata
Metadata
Assignees
Labels
in: webAn issue in web modules (web, webmvc)An issue in web modules (web, webmvc)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug