Package com.stytch.sdk.b2b.otp
Interface OTP.SMS
-
- All Implemented Interfaces:
public interface OTP.SMSProvides all possible ways to call SMS OTP endpoints
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classOTP.SMS.SendParametersA data class wrapping the parameters needed to send an SMS OTP
public final classOTP.SMS.AuthenticateParametersA data class wrapping the parameters needed to authenticate an SMS OTP
-
Method Summary
Modifier and Type Method Description abstract StytchResult<BasicData>send(OTP.SMS.SendParameters parameters)Send a one-time passcode (OTP) to a user using their phone number via SMS. abstract Unitsend(OTP.SMS.SendParameters parameters, Function1<StytchResult<BasicData>, Unit> callback)Send a one-time passcode (OTP) to a user using their phone number via SMS. abstract CompletableFuture<StytchResult<BasicData>>sendCompletable(OTP.SMS.SendParameters parameters)Send a one-time passcode (OTP) to a user using their phone number via SMS. abstract StytchResult<SMSAuthenticateResponseData>authenticate(OTP.SMS.AuthenticateParameters parameters)Authenticate a one-time passcode (OTP) sent to a user via SMS. abstract Unitauthenticate(OTP.SMS.AuthenticateParameters parameters, Function1<StytchResult<SMSAuthenticateResponseData>, Unit> callback)Authenticate a one-time passcode (OTP) sent to a user via SMS. abstract CompletableFuture<StytchResult<SMSAuthenticateResponseData>>authenticateCompletable(OTP.SMS.AuthenticateParameters parameters)Authenticate a one-time passcode (OTP) sent to a user via SMS. -
-
Method Detail
-
send
abstract StytchResult<BasicData> send(OTP.SMS.SendParameters parameters)
Send a one-time passcode (OTP) to a user using their phone number via SMS.
- Parameters:
parameters- required to receive a SMS OTP- Returns:
BasicResponse
-
send
abstract Unit send(OTP.SMS.SendParameters parameters, Function1<StytchResult<BasicData>, Unit> callback)
Send a one-time passcode (OTP) to a user using their phone number via SMS.
- Parameters:
parameters- required to receive a SMS OTPcallback- a callback that receives a BasicResponse
-
sendCompletable
abstract CompletableFuture<StytchResult<BasicData>> sendCompletable(OTP.SMS.SendParameters parameters)
Send a one-time passcode (OTP) to a user using their phone number via SMS.
- Parameters:
parameters- required to receive a SMS OTP- Returns:
BasicResponse
-
authenticate
abstract StytchResult<SMSAuthenticateResponseData> authenticate(OTP.SMS.AuthenticateParameters parameters)
Authenticate a one-time passcode (OTP) sent to a user via SMS.
- Parameters:
parameters- required to authenticate an SMS OTP- Returns:
SMSAuthenticateResponse
-
authenticate
abstract Unit authenticate(OTP.SMS.AuthenticateParameters parameters, Function1<StytchResult<SMSAuthenticateResponseData>, Unit> callback)
Authenticate a one-time passcode (OTP) sent to a user via SMS.
- Parameters:
parameters- required to authenticate an SMS OTPcallback- a callback that receives a SMSAuthenticateResponse
-
authenticateCompletable
abstract CompletableFuture<StytchResult<SMSAuthenticateResponseData>> authenticateCompletable(OTP.SMS.AuthenticateParameters parameters)
Authenticate a one-time passcode (OTP) sent to a user via SMS.
- Parameters:
parameters- required to authenticate an SMS OTP- Returns:
SMSAuthenticateResponse
-
-
-
-