Skip to content

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

@Chaoyingz

Description

@Chaoyingz

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")

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions