Class OAuth2PasswordProcessor
-
- All Implemented Interfaces:
public final class OAuth2PasswordProcessor extends OAuth2Processor
Handles authentication with OAuth2 One-time Passcode. In the type of OAuthClientPassword as designated OAuth2 client, it can authenticate with server programmatically without launching webview or browser.
-
-
Constructor Summary
Constructors Constructor Description OAuth2PasswordProcessor(OAuthConfig oAuthConfig, OAuthClientPassword oAuthClient, OkHttpClient okHttpClient)OAuth2PasswordProcessor(OAuthConfig oAuthConfig)
-
Method Summary
Modifier and Type Method Description OAuth2Tokenauthenticate()Starts the OAuth 2.0 authentication process. UnitcancelAuthentication()Cancels the ongoing authentication process. -
-
Constructor Detail
-
OAuth2PasswordProcessor
OAuth2PasswordProcessor(OAuthConfig oAuthConfig, OAuthClientPassword oAuthClient, OkHttpClient okHttpClient)
-
OAuth2PasswordProcessor
OAuth2PasswordProcessor(OAuthConfig oAuthConfig)
-
-
Method Detail
-
authenticate
@WorkerThread() OAuth2Token authenticate()
Starts the OAuth 2.0 authentication process.
- Returns:
The obtained OAuth2Token if the process was successful, otherwise null.
-
cancelAuthentication
Unit cancelAuthentication()
Cancels the ongoing authentication process. Does nothing if there was no ongoing authentication.
-
-
-
-