Skip to content

Commit

Permalink
Fix enterprise OAuth url. Closes #126
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Mar 3, 2016
1 parent 8e32a46 commit 353b75e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wechatpy/enterprise/client/api/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

class WeChatOAuth(BaseWeChatAPI):

OAUTH_BASE_URl = 'https://open.weixin.qq.com/connect/oauth2/authorize'
OAUTH_BASE_URL = 'https://open.weixin.qq.com/connect/oauth2/authorize'

def authorize_url(self, redirect_url, state=None):
def authorize_url(self, redirect_uri, state=None):
"""
获取授权地址
详情请参考
Expand All @@ -19,9 +19,9 @@ def authorize_url(self, redirect_url, state=None):
:param state: 重定向后会带上 state 参数
:return: 返回的 JSON 数据包
"""
redirect_uri = six.moves.urllib.parse.quote(self.redirect_uri)
redirect_uri = six.moves.urllib.parse.quote(redirect_uri)
url_list = [
self.OAUTH_BASE_URl,
self.OAUTH_BASE_URL,
'?appid=',
self.corp_id,
'&redirect_uri=',
Expand Down

0 comments on commit 353b75e

Please sign in to comment.