mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-15 02:35:08 +08:00
增加生成授权链接方法,重定向链接可直接读取配置。
This commit is contained in:
@@ -392,6 +392,16 @@ public interface WxCpService {
|
||||
*/
|
||||
void tagAddUsers(String tagId, List<String> userIds, List<String> partyIds) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 构造oauth2授权的url连接
|
||||
* </pre>
|
||||
*
|
||||
* @param state
|
||||
* @return
|
||||
*/
|
||||
String oauth2buildAuthorizationUrl(String state);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 构造oauth2授权的url连接
|
||||
|
@@ -444,6 +444,14 @@ public class WxCpServiceImpl implements WxCpService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String oauth2buildAuthorizationUrl(String state) {
|
||||
return this.oauth2buildAuthorizationUrl(
|
||||
this.wxCpConfigStorage.getOauth2redirectUri(),
|
||||
state
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String oauth2buildAuthorizationUrl(String redirectUri, String state) {
|
||||
String url = "https://open.weixin.qq.com/connect/oauth2/authorize?";
|
||||
url += "appid=" + wxCpConfigStorage.getCorpId();
|
||||
|
Reference in New Issue
Block a user