Skip to content

Naming of Token type #4

@tesaguri

Description

@tesaguri

While the term "token" in OAuth 1.0 refers to token credentials, oauth_credentials::Token represents a set of client credentials and token credentials, which are not identical concepts. The difference is confusing especially when a user uses the term to refer to the both concepts at the same time, which is the case almost every time they construct a Token.

let token: Credentials = get_token(&client).await; // Token credentials
let token = Token::new(client, token); // Client and token credentials

Also, token.client() and token.token() doesn't sound very well.

So I think Token should be renamed if there is a good alternative. Renaming a type doesn't prevent the semver trick, so it wouldn't cause a breakage provided that it is done before 1.0 release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions