Polish One-Time Token API Names and Doc

The names of variables and methods have been adjusted in accordance with the names of the one-time token login API components.

Issue gh-15114
This commit is contained in:
Max Batischev
2024-10-15 23:39:40 +03:00
committed by Josh Cummings
parent e9fe6360bc
commit d37d41c130
11 changed files with 268 additions and 64 deletions

View File

@@ -45,7 +45,7 @@ public class GenerateOneTimeTokenWebFilterTests {
private final ReactiveOneTimeTokenService oneTimeTokenService = mock(ReactiveOneTimeTokenService.class);
private final ServerRedirectOneTimeTokenGenerationSuccessHandler generatedOneTimeTokenHandler = new ServerRedirectOneTimeTokenGenerationSuccessHandler(
private final ServerRedirectOneTimeTokenGenerationSuccessHandler oneTimeTokenGenerationSuccessHandler = new ServerRedirectOneTimeTokenGenerationSuccessHandler(
"/login/ott");
private static final String TOKEN = "token";
@@ -60,7 +60,7 @@ public class GenerateOneTimeTokenWebFilterTests {
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.body("username=user"));
GenerateOneTimeTokenWebFilter filter = new GenerateOneTimeTokenWebFilter(this.oneTimeTokenService,
this.generatedOneTimeTokenHandler);
this.oneTimeTokenGenerationSuccessHandler);
filter.filter(exchange, (e) -> Mono.empty()).block();
@@ -75,7 +75,7 @@ public class GenerateOneTimeTokenWebFilterTests {
MockServerHttpRequest.BaseBuilder<?> request = MockServerHttpRequest.post("/ott/generate");
MockServerWebExchange exchange = MockServerWebExchange.from(request);
GenerateOneTimeTokenWebFilter filter = new GenerateOneTimeTokenWebFilter(this.oneTimeTokenService,
this.generatedOneTimeTokenHandler);
this.oneTimeTokenGenerationSuccessHandler);
filter.filter(exchange, (e) -> Mono.empty()).block();
@@ -86,14 +86,14 @@ public class GenerateOneTimeTokenWebFilterTests {
public void constructorWhenOneTimeTokenServiceNullThenIllegalArgumentException() {
// @formatter:off
assertThatIllegalArgumentException()
.isThrownBy(() -> new GenerateOneTimeTokenWebFilter(null, this.generatedOneTimeTokenHandler));
.isThrownBy(() -> new GenerateOneTimeTokenWebFilter(null, this.oneTimeTokenGenerationSuccessHandler));
// @formatter:on
}
@Test
public void setWhenRequestMatcherNullThenIllegalArgumentException() {
GenerateOneTimeTokenWebFilter filter = new GenerateOneTimeTokenWebFilter(this.oneTimeTokenService,
this.generatedOneTimeTokenHandler);
this.oneTimeTokenGenerationSuccessHandler);
// @formatter:off
assertThatIllegalArgumentException()
.isThrownBy(() -> filter.setRequestMatcher(null));