|
@@ -343,18 +343,21 @@ public class WebClientReactiveAuthorizationCodeTokenResponseClientTests {
|
|
return new OAuth2AuthorizationCodeGrantRequest(registration, authorizationExchange);
|
|
return new OAuth2AuthorizationCodeGrantRequest(registration, authorizationExchange);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // gh-10130
|
|
@Test
|
|
@Test
|
|
public void setHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
|
public void setHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
|
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.setHeadersConverter(null))
|
|
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.setHeadersConverter(null))
|
|
.withMessage("headersConverter cannot be null");
|
|
.withMessage("headersConverter cannot be null");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // gh-10130
|
|
@Test
|
|
@Test
|
|
public void addHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
|
public void addHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
|
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.addHeadersConverter(null))
|
|
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.addHeadersConverter(null))
|
|
.withMessage("headersConverter cannot be null");
|
|
.withMessage("headersConverter cannot be null");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // gh-10130
|
|
@Test
|
|
@Test
|
|
public void convertWhenHeadersConverterAddedThenCalled() throws Exception {
|
|
public void convertWhenHeadersConverterAddedThenCalled() throws Exception {
|
|
OAuth2AuthorizationCodeGrantRequest request = authorizationCodeGrantRequest();
|
|
OAuth2AuthorizationCodeGrantRequest request = authorizationCodeGrantRequest();
|
|
@@ -380,6 +383,7 @@ public class WebClientReactiveAuthorizationCodeTokenResponseClientTests {
|
|
assertThat(actualRequest.getHeader("custom-header-name")).isEqualTo("custom-header-value");
|
|
assertThat(actualRequest.getHeader("custom-header-name")).isEqualTo("custom-header-value");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // gh-10130
|
|
@Test
|
|
@Test
|
|
public void convertWhenHeadersConverterSetThenCalled() throws Exception {
|
|
public void convertWhenHeadersConverterSetThenCalled() throws Exception {
|
|
OAuth2AuthorizationCodeGrantRequest request = authorizationCodeGrantRequest();
|
|
OAuth2AuthorizationCodeGrantRequest request = authorizationCodeGrantRequest();
|