Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我们如何使用docusignandroidsdk方法或其他方式跳过登录或隐式验证?_Android_Docusignapi_Docusignapextoolkit_Docusignconnect - Fatal编程技术网

我们如何使用docusignandroidsdk方法或其他方式跳过登录或隐式验证?

我们如何使用docusignandroidsdk方法或其他方式跳过登录或隐式验证?,android,docusignapi,docusignapextoolkit,docusignconnect,Android,Docusignapi,Docusignapextoolkit,Docusignconnect,我已经在我的应用程序中集成了docuSign Android SDK,并且能够实现嵌入式签名。但它要求客户在签署文档之前登录。由于它是面向客户的应用程序,我们不希望他们输入组织文档签名凭据。 如何使用SDK方法或其他方式跳过登录或隐式验证 提前谢谢 在Android SDK中,我们提供以下API来登录或验证 使用访问令牌登录: 您可以调用以下SDK API: // accessToken - Access Token which authenticates the user // refresh

我已经在我的应用程序中集成了docuSign Android SDK,并且能够实现嵌入式签名。但它要求客户在签署文档之前登录。由于它是面向客户的应用程序,我们不希望他们输入组织文档签名凭据。 如何使用SDK方法或其他方式跳过登录或隐式验证


提前谢谢

在Android SDK中,我们提供以下API来登录或验证

  • 使用访问令牌登录:

    您可以调用以下SDK API:

    // accessToken - Access Token which authenticates the user
    // refreshToken - If the access token can be refreshed, the refresh token. Optional
    // expiresIn - The number of seconds from the time the access token was provisioned to when it will expire
    try {
     DSAuthenticationDelegate docusignAuthDelegate = DocuSign.getInstance().getAuthenticationDelegate();
     docusignAuthDelegate.login(accessToken, refreshToken, expiresIn, context,
         new DSAuthenticationListener() {
             @Override
             public void onSuccess(@NonNull DSUser user) {
                 // TODO: handle successful authentication here
             }
    
             @Override
             public void onError(@NonNull DSAuthenticationException exception) {
                 // TODO: handle authentication failure here
             }
         }
     );
    } catch (DocuSignNotInitializedException exception) {
     // TODO: handle error. This means the SDK object was not properly initialized
    }
    
    您可以通过以下方式检索访问令牌:

    a。通过以下步骤使用JWT授予身份验证

    b。按照中提到的步骤使用授权码授权

    使用JWT Grant身份验证获取访问令牌需要在后端实现,一旦服务器使用此方法从DocuSign接收到访问令牌,然后您的服务器需要将访问令牌和过期时间传递给您的应用程序,您的应用程序可以使用访问令牌和过期时间调用上述Android SDK登录api

  • 使用OAuth登录:

    在用户输入凭据的位置显示UI。 从您的帐户获取OAuth客户端Id/集成密钥、密钥和重定向URI。(请参阅有关如何从您的帐户检索clientId、secretKey和redirectUri的信息)

    初始化DocuSign SDk时,按如下所示传递这些值

     DocuSign.init(
     context,
     clientId,
     secretKey,
     redirectUri,
     DSMode.DEBUG
    ).setEnvironment(environment)
    
    DSAuthenticationDelegate authenticationDelegate = DocuSign.getInstance().getAuthenticationDelegate();
    authenticationDelegate.login(REQUEST_LOGIN, this, new DSAuthenticationListener() {
    }
    
    这将打开OAuth登录屏幕。输入您的用户名和密码,您应该可以登录

  • 在您的用例中,您可以使用SDK“使用访问令牌登录”方法