Class RequestMagicLinkUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.ott.RequestMagicLinkUseCase
Sends a magic link to the verified e-mail address of an enabled account. It is enumeration-safe: for an unknown
identifier, a disabled account or an address that is not verified nothing is sent and nothing is reported. The link
is not delivered here but through an
EmailLinkRequested event, handled after the transaction commits and off
the request thread, so that no remote call runs inside a transaction and the mail server's latency does not show.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisherPublishes the delivery request.private final OttPolicyPolicy of the tokens, which sets the lifetime shown with the link.private final ResolveOttDestinationUseCaseUse case that finds the e-mail address of the account. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
resolveOttDestinationUseCase
Use case that finds the e-mail address of the account. -
ottPolicy
Policy of the tokens, which sets the lifetime shown with the link. -
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisherPublishes the delivery request.
-
-
Constructor Details
-
RequestMagicLinkUseCase
public RequestMagicLinkUseCase()
-
-
Method Details
-
execute
Requests the delivery of a link.- Parameters:
identifier- the name the user signs in with.link- the link that opens the confirmation page.
-