Interface OttDelivery
public interface OttDelivery
Port that delivers a one-time token to a destination through a channel.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeliverCode(OttChannel channel, String destination, String code, Duration validFor) Delivers a numeric code.voiddeliverLink(OttChannel channel, String destination, URI link, Duration validFor) Delivers a magic link.
-
Method Details
-
deliverCode
Delivers a numeric code.- Parameters:
channel- channel to use.destination- e-mail address or E.164 phone number, according to the channel.code- the code in clear text.validFor- how long the code stays valid, shown to the user.- Throws:
OttDeliveryException- if the code could not be delivered.
-
deliverLink
Delivers a magic link.- Parameters:
channel- channel to use.destination- e-mail address or E.164 phone number, according to the channel.link- the link that opens the confirmation page.validFor- how long the link stays valid, shown to the user.- Throws:
OttDeliveryException- if the link could not be delivered.
-