Class OneTimeTokenServiceConfiguration
java.lang.Object
com.irurueta.authserver.authorization.infrastructure.persistence.ott.OneTimeTokenServiceConfiguration
Registers Spring Security's JDBC one-time token service, which stores the magic link tokens in the
one_time_tokens table instead of in memory. The login chain's oneTimeTokenLogin configurer finds it
as a bean.
The service keeps its own hourly cleanup of expired tokens. It is left enabled on purpose: disabling it with
setCleanupCron(null) does not stop the scheduler the constructor has already started, and an hourly delete
of expired rows is harmless next to the cleanup job of the application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.ott.JdbcOneTimeTokenServiceoneTimeTokenService(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Creates the one-time token service of the magic links.
-
Constructor Details
-
OneTimeTokenServiceConfiguration
public OneTimeTokenServiceConfiguration()
-
-
Method Details
-
oneTimeTokenService
@Bean public org.springframework.security.authentication.ott.JdbcOneTimeTokenService oneTimeTokenService(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Creates the one-time token service of the magic links.- Parameters:
jdbcOperations- JDBC operations of the application datasource.- Returns:
- the one-time token service.
-