Update Magic Link Sample

Issue gh-312
This commit is contained in:
Josh Cummings
2024-10-14 14:39:48 -06:00
parent 2c32dde3bf
commit f7b144db04
2 changed files with 4 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ java {
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }

View File

@@ -25,19 +25,19 @@ import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.authentication.ott.OneTimeToken;
import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.security.web.authentication.ott.GeneratedOneTimeTokenHandler;
import org.springframework.security.web.authentication.ott.OneTimeTokenGenerationSuccessHandler;
import org.springframework.security.web.util.UrlUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.util.UriComponentsBuilder;
@Component
public class MagicLinkGeneratedOneTimeTokenHandler implements GeneratedOneTimeTokenHandler {
public class MagicLinkOneTimeTokenGenerationSuccessHandler implements OneTimeTokenGenerationSuccessHandler {
private final MailSender mailSender;
private final RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
public MagicLinkGeneratedOneTimeTokenHandler(MailSender mailSender) {
public MagicLinkOneTimeTokenGenerationSuccessHandler(MailSender mailSender) {
this.mailSender = mailSender;
}