Package 

Object Auth.Companion

    • Method Detail

      • startOAuth2Authentication

         final Unit startOAuth2Authentication(Context context, String appKey, String desiredUid, Array<String> alreadyAuthedUids, String sessionId, String webHost)

        Starts the Dropbox authentication process by launching an external app (either the Dropbox app if available or a web browser) where the user will log in and allow your app access.

        This variant should be used when authentication is being done due to an OpenWith request through action {@value DbxOfficialAppConnector#ACTION_DBXC_EDIT} and {@value DbxOfficialAppConnector#ACTION_DBXC_VIEW}. You won't need to use this unless you are a partner who registered your app with openwith feature in our official Dropbox app.

        Parameters:
        context - the Context to use to launch the Dropbox authentication activity.
        appKey - the app's key.
        desiredUid - Encourage user to authenticate account defined by this uid.
        alreadyAuthedUids - Array of any other uids currently authenticated with this app.
        sessionId - The SESSION_ID Extra on an OpenWith intent.
        webHost - Server host used for oauth
      • startOAuth2PKCE

         final Unit startOAuth2PKCE(Context context, String appKey, DbxRequestConfig requestConfig, DbxHost host)

        Starts the Dropbox OAuth process by launching the Dropbox official app (AKA DAuth) or web browser if dropbox official app is not available. In browser flow, normally user needs to sign in.

        Parameters:
        context - the Context to use to launch the
        •                       Dropbox authentication activity. This will typically be an
        •                       [Activity] and the user will be taken back to that
        •                       activity after authentication is complete (i.e., your activity
        •                       will receive an `onResume()`).
        appKey - the app's key.
        requestConfig - Default attributes to use for each request
        host - Dropbox hosts to send requests to (used for mocking and testing)
      • startOAuth2PKCE

         final Unit startOAuth2PKCE(Context context, String appKey, DbxRequestConfig requestConfig, DbxHost host, Collection<String> scope, IncludeGrantedScopes includeGrantedScopes)

        Starts the Dropbox OAuth process by launching the Dropbox official app (AKA DAuth) or web browser if dropbox official app is not available. In browser flow, normally user needs to sign in.

        Parameters:
        context - the Context to use to launch the
        •                       Dropbox authentication activity. This will typically be an
        •                       [Activity] and the user will be taken back to that
        •                       activity after authentication is complete (i.e., your activity
        •                       will receive an `onResume()`).
        appKey - the app's key.
        requestConfig - Default attributes to use for each request
        host - Dropbox hosts to send requests to (used for mocking and testing)
        scope - A list of scope strings.
        includeGrantedScopes - If this is set, result will contain both new scopes and all previously granted scopes.
      • getScope

         final String getScope()

        Get the scope authorized in this OAuth flow.