我们如何使用docusignandroidsdk方法或其他方式跳过登录或隐式验证?
我已经在我的应用程序中集成了docuSign Android SDK,并且能够实现嵌入式签名。但它要求客户在签署文档之前登录。由于它是面向客户的应用程序,我们不希望他们输入组织文档签名凭据。 如何使用SDK方法或其他方式跳过登录或隐式验证我们如何使用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
提前谢谢 在Android 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
DocuSign.init(
context,
clientId,
secretKey,
redirectUri,
DSMode.DEBUG
).setEnvironment(environment)
DSAuthenticationDelegate authenticationDelegate = DocuSign.getInstance().getAuthenticationDelegate();
authenticationDelegate.login(REQUEST_LOGIN, this, new DSAuthenticationListener() {
}
这将打开OAuth登录屏幕。输入您的用户名和密码,您应该可以登录