| 程序包 | 说明 |
|---|---|
| org.kangspace.wechat.config |
配置相关包
含常量,微信相关API URL及其他配置
properties文件读取
|
| org.kangspace.wechat.oauth2 |
网页授权相关包
接口:
跳转到网页授权地址
new OAuth2InterfaceAccess().redirectToAuthorizeUrl();
获取网页授权AccessToken,含openId
new OAuth2InterfaceAccess().getAccessToken()
|
| 限定符和类型 | 方法和说明 |
|---|---|
static WeChatConfig.OAth2Scope |
WeChatConfig.OAth2Scope.valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static WeChatConfig.OAth2Scope[] |
WeChatConfig.OAth2Scope.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
WeChatConfig.getOauth2AuthorizeUrl(String appId,
String redirectUri,
WeChatConfig.OAth2Scope scope,
String state)
获取网页授权URL
redirect将被URLEncode
|
static String |
WeChatConfig.getOauth2AuthorizeUrl(String redirectUri,
WeChatConfig.OAth2Scope scope,
String state)
获取网页授权URL,默认微信APP_ID
redirect将被URLEncode
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
OAuth2InterfaceAccess.redirectToAuthorizeUrl(String appId,
String redirectURI,
String param,
WeChatConfig.OAth2Scope scope,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
302重定向跳转到网页授权
|
Copyright © 2020. All rights reserved.