Skip to content

Commit 3a95a37

Browse files
Update Javadoc for DefaultLoginPageGeneratingFilter
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
1 parent 3f1a794 commit 3a95a37

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/modules/ROOT/pages/servlet/authentication/onetimetoken.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ In the following sections we will explore how to configure OTT Login for your ne
4242
[[default-pages]]
4343
== Default Login Page and Default One-Time Token Submit Page
4444

45-
When the `oneTimeTokenLogin()` DSL is used, by default the One-Time Token Login Page is auto-generated by the org.springframework.security.web.authentication.ui:DefaultLoginPageGeneratingFilter[].
45+
When the `oneTimeTokenLogin()` DSL is used, by default the One-Time Token Login Page is auto-generated by the javadoc:org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter[].
4646
The DSL will also set up the javadoc:org.springframework.security.web.authentication.ui.DefaultOneTimeTokenSubmitPageGeneratingFilter[] to generate a default One-Time Token submit page.
4747

4848
[[sending-token-to-user]]
@@ -179,7 +179,7 @@ class PageController {
179179
<1> Make the `MagicLinkOneTimeTokenGenerationSuccessHandler` a Spring bean
180180
<2> Create a login processing URL with the `token` as a query param
181181
<3> Retrieve the user's email based on the username
182-
<4> Use the `JavaMailSender` API to send the email to the user with the magic link
182+
<4> Use the `MailSender` API to send the email to the user with the magic link
183183
<5> Use the `RedirectOneTimeTokenGenerationSuccessHandler` to perform a redirect to your desired URL
184184

185185
The email content will look similar to:
@@ -557,7 +557,7 @@ class MagicLinkOneTimeTokenGenerationSuccessHandler : OneTimeTokenGenerationSucc
557557
== Customize GenerateOneTimeTokenRequest Instance
558558
There are a number of reasons that you may want to adjust an GenerateOneTimeTokenRequest. For example, you may want expiresIn to be set to 10 mins, which Spring Security sets to 5 mins by default.
559559

560-
You can customize elements of GenerateOneTimeTokenRequest by publishing an GenerateOneTimeTokenRequestResolver as a @Bean, like so:
560+
You can customize elements of GenerateOneTimeTokenRequest by publishing an GenerateOneTimeTokenRequestResolver as a `@Bean`, like so:
561561
[tabs]
562562
======
563563
Java::
@@ -568,9 +568,9 @@ Java::
568568
GenerateOneTimeTokenRequestResolver generateOneTimeTokenRequestResolver() {
569569
DefaultGenerateOneTimeTokenRequestResolver delegate = new DefaultGenerateOneTimeTokenRequestResolver();
570570
return (request) -> {
571-
GenerateOneTimeTokenRequest generate = delegate.resolve(request);
572-
return new GenerateOneTimeTokenRequest(generate.getUsername(), Duration.ofSeconds(600));
573-
};
571+
GenerateOneTimeTokenRequest generate = delegate.resolve(request);
572+
return new GenerateOneTimeTokenRequest(generate.getUsername(), Duration.ofMinutes(10));
573+
};
574574
}
575575
----
576576

0 commit comments

Comments
 (0)