Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 调用authentication_client.get_user_info_by_access_token方法报错 #14

Open
Chaoyingz opened this issue Dec 14, 2022 · 0 comments

Comments

@Chaoyingz
Copy link

Description

Minimal code-snippet showcasing the problem

authentication_client = AuthenticationClient(
    app_id='x',
    app_host="x",
    app_secret='x',
)
token = "x"
authentication_client.get_user_info_by_access_token(token)

Expected behavior

返回用户资料

Actual behavior

return session.request(method=method, url=url, **kwargs)
E           TypeError: request() got an unexpected keyword argument 'token'

我看了下代码,应该在ProtocolHttpClient的request方法内添加如下内容:

if "token" in kwargs:
    headers["authorization"] = "Bearer %s" % kwargs.pop("token")

添加后可以正常调用该方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant