public class Auth extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getAuthorizeUrl(String shopKey)
获取授权地址,用于私有应用
|
String |
getAuthorizeUrl(String shopKey,
String state)
获取授权地址,用于开放应用
|
protected static Auth |
getInstance(String appHost,
String httpProtocol,
String appKey,
String appSecret,
String redirectUrl) |
protected static Auth |
getInstance(String appHost,
String httpProtocol,
String appKey,
String appSecret,
String redirectUrl,
String[] scope) |
YhsdResponse |
getToken()
私有应用获取token
|
YhsdResponse |
getToken(String code)
公有应用获取token
|
String |
thirdAppAesEncrypt(String customerData,
String strKey)
第三方接入支持
使用AES 算法 加密,默认模式 AES/CBC/PKCS5Padding
|
boolean |
verifyHmac(String hmac,
String urlParam)
验证请求合法性
|
protected static Auth getInstance(String appHost, String httpProtocol, String appKey, String appSecret, String redirectUrl, String[] scope) throws YhsdException
YhsdExceptionprotected static Auth getInstance(String appHost, String httpProtocol, String appKey, String appSecret, String redirectUrl)
public boolean verifyHmac(String hmac, String urlParam)
hmac - 请求中的hmac参数urlParam - 请求中的其它参数public String getAuthorizeUrl(String shopKey, String state)
shopKey - shopKey,可在请求中获取state - 同上public String getAuthorizeUrl(String shopKey)
shopKey - shopKey,可在请求中获取public YhsdResponse getToken(String code)
code - 可在请求中获取public YhsdResponse getToken()
Copyright © 2016. All rights reserved.