Interface OneTimeTokenService
- All Known Implementing Classes:
InMemoryOneTimeTokenService
,JdbcOneTimeTokenService
public interface OneTimeTokenService
Interface for generating and consuming one-time tokens.
- Since:
- 6.4
-
Method Summary
Modifier and TypeMethodDescriptionconsume
(OneTimeTokenAuthenticationToken authenticationToken) Consumes a one-time token based on the provided authentication token.generate
(GenerateOneTimeTokenRequest request) Generates a one-time token based on the provided generate request.
-
Method Details
-
generate
Generates a one-time token based on the provided generate request.- Parameters:
request
- the generate request containing the necessary information to generate the token- Returns:
- the generated
OneTimeToken
, nevernull
.
-
consume
Consumes a one-time token based on the provided authentication token.- Parameters:
authenticationToken
- the authentication token containing the one-time token value to be consumed- Returns:
- the consumed
OneTimeToken
ornull
if the token is invalid
-