| 程序包 | 说明 |
|---|---|
| net.jlxxw.wechat.dto.auth | |
| net.jlxxw.wechat.function.auth |
| 限定符和类型 | 方法和说明 |
|---|---|
static AuthScope |
AuthScope.valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static AuthScope[] |
AuthScope.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
WebPageAuthorizationManager.getAuthorizeUrl(@NotBlank(message="\u91cd\u5b9a\u5411\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a") @Pattern(regexp="^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\\\/])+$",message="\u91cd\u5b9a\u5411\u5730\u5740\u5fc5\u987b\u662f\u4e00\u4e2a\u94fe\u63a5\u5730\u5740") String redirectUri,
@NotNull(message="\u6388\u6743\u4f5c\u7528\u57df\u4e0d\u80fd\u4e3a\u7a7a") AuthScope scope,
@Size(max=128,message="\u6700\u5927\u957f\u5ea6128\u5b57\u8282") String state)
第一步:用户同意授权,获取code
在确保微信公众账号拥有授权作用域(scope参数)的权限的前提下
(已认证服务号,默认拥有 scope 参数中的snsapi_base和snsapi_userinfo 权限),引导关注者打开如下页面:
https://open.weixin.qq.com/connect/oauth2/authorize?
|
Copyright © 2022. All rights reserved.