Class OAuth2WebViewProcessor

    • Constructor Detail

      • OAuth2WebViewProcessor

        OAuth2WebViewProcessor(OAuth2Configuration oauth2Configuration, OkHttpClient client)
      • OAuth2WebViewProcessor

        OAuth2WebViewProcessor(OAuthConfig oAuthConfig, AbstractOAuthClient oAuthClient, OkHttpClient client, CertificateProvider certificateProvider, IBackPress iBackPress)
        Constructs a new OAuth2WebViewProcessor.
        Parameters:
        oAuthConfig - the OAuth configuration
        oAuthClient - the AbstractOAuthClient used as OAuth credentials
        client - the OkHttpClient used to make requests
        certificateProvider - used to get a client certificate if the server requests
        iBackPress - the callback for WebView device back press
      • OAuth2WebViewProcessor

        OAuth2WebViewProcessor(OAuthConfig oAuthConfig, AbstractOAuthClient oAuthClient, OkHttpClient client, CertificateProvider certificateProvider)
        Constructs a new OAuth2WebViewProcessor.
        Parameters:
        oAuthConfig - the OAuth configuration
        oAuthClient - the AbstractOAuthClient used as OAuth credentials
        client - the OkHttpClient used to make requests
        certificateProvider - used to get a client certificate if the server requests
      • OAuth2WebViewProcessor

        OAuth2WebViewProcessor(OAuthConfig oAuthConfig, AbstractOAuthClient oAuthClient, OkHttpClient client)
        Constructs a new OAuth2WebViewProcessor.
        Parameters:
        oAuthConfig - the OAuth configuration
        oAuthClient - the AbstractOAuthClient used as OAuth credentials
        client - the OkHttpClient used to make requests
      • OAuth2WebViewProcessor

        OAuth2WebViewProcessor(OAuthConfig oAuthConfig, AbstractOAuthClient oAuthClient)
        Constructs a new OAuth2WebViewProcessor.
        Parameters:
        oAuthConfig - the OAuth configuration
        oAuthClient - the AbstractOAuthClient used as OAuth credentials
      • OAuth2WebViewProcessor

        OAuth2WebViewProcessor(OAuthConfig oAuthConfig)
        Constructs a new OAuth2WebViewProcessor.
        Parameters:
        oAuthConfig - the OAuth configuration
    • Method Detail

      • authenticate

        @WorkerThread() OAuth2Token authenticate()

        Starts the OAuth 2.0 authentication process. When using the Authorization Code Grant type this method will present a web view.

        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.