我将authlib与以下代码一起使用:
session = OAuth2Session(client_id, client_secret)
token = session.fetch_access_token(
access_token_url,
client_id='.....',
method='POST',
client_secret=client_secret,
authorization_response=request.url,
code=request.args['code']
)
它叫了一声requests.exceptions.SSLError请求.exceptions.SSLError尝试使用自签名证书访问自己的OAuth2服务器时(CERTIFICATE\u VERIFY\u失败)。你知道吗
不管出现这种错误,我应该怎么做才能使用HTTPS?你知道吗
有两种方法:
verify=False
,它不会验证SSLOAuth2Session.fetch_access_token
接受请求支持的所有参数。检查请求API文档:https://2.python-requests.org/en/master/api/#requests.request相关问题 更多 >
编程相关推荐