public interface OTPWebStrategy
Modifier and Type | Method and Description |
---|---|
void |
startOTPAuthentication(android.content.Context appContext,
java.lang.String finishEndpoint,
java.lang.String finishEndpointParam,
java.lang.String redirectToOriginalURLParam,
OTPAuthenticationCompleteCallback callback)
Starts the OTP authentication by opening the finish endpoint URL.
|
void startOTPAuthentication(android.content.Context appContext, java.lang.String finishEndpoint, java.lang.String finishEndpointParam, java.lang.String redirectToOriginalURLParam, OTPAuthenticationCompleteCallback callback)
Implementations are expected to open the specified finish endpoint as a web page and close it when the final redirect happens. Furthermore, the specified callback must be invoked otherwise the pending HTTP request(s) waiting for it to complete might be held up indefinitely.
A successful authentication is assumed to result in a series of HTTP cookies being set on the client side. Refer to the documentation of the callback for the details.
It is guaranteed that within the application only one method of this type is executing at a given time. This is because strategies are shared across conversations and conversation managers.
appContext
- the application context, must be non-nullfinishEndpoint
- the URL where to start the authentication, must be non-nullfinishEndpointParam
- the name of the URL parameter to look for in the final redirect back to the finish endpoint, must be non-nullredirectToOriginalURLParam
- the name of the URL parameter used to mark whether the request should be redirected to the original form.callback
- the callback to invoke when the OTP authentication process completes, must be non-null