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

Naming of Token type #4

Open
tesaguri opened this issue Nov 14, 2020 · 0 comments
Open

Naming of Token type #4

tesaguri opened this issue Nov 14, 2020 · 0 comments

Comments

@tesaguri
Copy link
Owner

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.

@tesaguri tesaguri added this to the credentials-v1.0 milestone Nov 14, 2020
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