|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcn.signit.sdk.SignitClient
public class SignitClient
易企签快捷签署 Java SDK的基本操作类
2018-12-8 将此Client扩展为易企签所有开放平台应用公共使用的Client since:2.0.0
| 构造方法摘要 | |
|---|---|
SignitClient(Authentication auth)
默认为:快捷签署客户端. |
|
SignitClient(Authentication auth,
String envUrl)
已过时。 |
|
SignitClient(String appId,
String secretKey,
String appUrl)
应用客户端. |
|
| 方法摘要 | ||
|---|---|---|
|
execute(AbstractSignitRequest<T> request)
|
|
OauthData |
getOauthData(String apiKey,
String secretKey,
TokenType grantType,
boolean autoSetRequestToken)
|
|
WebhookData |
parseWebhookData(String webhook)
快捷签署webhook响应数据解析. |
|
static WebhookResponse |
parseWebhookResponse(String webhook)
解析webhook响应数据. |
|
SignatureResponse |
sendSignatureRequest(SignatureRequest request)
发送快捷签署请求. |
|
SignitClient |
setEnvironmentUrl(String url)
已过时。 |
|
SignitClient |
setOauthUrl(String url)
设置授权请求路径. |
|
SignitClient |
setSignUrl(String url)
已过时。 |
|
static boolean |
verify(String appId,
String appSecretKey,
byte[] body,
javax.servlet.http.HttpServletRequest request)
客户端验证服务器的webhook响应数据 |
|
static boolean |
verify(String signitSignature,
String appId,
HmacSignatureBuilder builder)
客户端验证服务器的webhook响应数据. |
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public SignitClient(Authentication auth)
auth - 授权信息
@Deprecated
public SignitClient(Authentication auth,
String envUrl)
auth - 授权信息envUrl - 应用环境
public SignitClient(String appId,
String secretKey,
String appUrl)
appId - APP IDsecretKey - APP SecretappUrl - 应用请求路径| 方法详细信息 |
|---|
@Deprecated public SignitClient setEnvironmentUrl(String url)
url - 应用环境
public SignitClient setOauthUrl(String url)
url - 授权请求路径
@Deprecated public SignitClient setSignUrl(String url)
url - 快捷签署请求路径
public SignatureResponse sendSignatureRequest(SignatureRequest request)
throws SignitException,
IOException
request - 快捷签署请求
SignitException - 易企签自定义异常
IOException - 数据流异常
public OauthData getOauthData(String apiKey,
String secretKey,
TokenType grantType,
boolean autoSetRequestToken)
throws SignitException
SignitExceptionpublic WebhookData parseWebhookData(String webhook)
webhook - webhook Json格式数据字符串
public static WebhookResponse parseWebhookResponse(String webhook)
webhook - webhook Json格式字符串
public <T extends AbstractSignitResponse> T execute(AbstractSignitRequest<T> request)
throws SignitException
SignitException
public static boolean verify(String signitSignature,
String appId,
HmacSignatureBuilder builder)
signitSignature - webhook响应header中x-signit-signature数据。服务器构建的hmac,用于客户端验证服务器appId - APP IDbuilder - hmac签名建造器
public static boolean verify(String appId,
String appSecretKey,
byte[] body,
javax.servlet.http.HttpServletRequest request)
throws IOException
appId - APP IDappSecretKey - APP Secretbody - webhook响应具体数据。考虑到request中只能获取到body一次,故而需要在方法外获取并传递给此方法request - 服务端向客户端发起的请求
IOException - 数据流异常
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||