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

add passwordcredentials client like clientcredentials #186

Open
josephholsten opened this issue Jun 1, 2016 · 18 comments
Open

add passwordcredentials client like clientcredentials #186

josephholsten opened this issue Jun 1, 2016 · 18 comments

Comments

@josephholsten
Copy link
Contributor

josephholsten commented Jun 1, 2016

https://go-review.googlesource.com/c/23834/

In order to use PasswordCredentialsToken, a TokenSource needs to be provided. It's not complicated to have one of these readily available, in the style of golang.org/x/oauth2/clientcredentials.

It would also be good to have #146, which would fix #110.

josephholsten added a commit to josephholsten/oauth2 that referenced this issue Jun 1, 2016
Using PasswordCredentialsToken requires a TokenSource. This implements a
Config similar to oauth2/clientcredentials for the Resource Owner Password
Credentials Grant.

See https://tools.ietf.org/html/rfc6749#section-4.3 for more info.

Fixes golang#186

Change-Id: I3c6032899d6c286b84f8f24e0f6a240004f4f6c0
@josephholsten
Copy link
Contributor Author

josephholsten commented Jun 1, 2016

@josephholsten
Copy link
Contributor Author

needs tests and doc

@josephholsten
Copy link
Contributor Author

Tests done, doc needs review

@josephholsten
Copy link
Contributor Author

doc should be ready

josephholsten added a commit to josephholsten/oauth2 that referenced this issue Jun 2, 2016
Using PasswordCredentialsToken requires a TokenSource. This implements a
Config similar to oauth2/clientcredentials for the Resource Owner Password
Credentials Grant.

See https://tools.ietf.org/html/rfc6749#section-4.3 for more info.

Fixes golang#186

Change-Id: I3c6032899d6c286b84f8f24e0f6a240004f4f6c0
@josephholsten
Copy link
Contributor Author

reverted by https://go-review.googlesource.com/#/c/23841/, apparently this requires more discussion

@josephholsten
Copy link
Contributor Author

@rakyll I added another comment to the CL, you made a great point. That's how I ended up submitting this. This "reimplements" https://godoc.org/golang.org/x/oauth2#Config.PasswordCredentialsToken using the same implementation pattern from https://godoc.org/golang.org/x/oauth2/clientcredentials, because using PasswordCredentialsToken as is requires implementing a wrapper TokenSource.

I'm planning to make a CL reimplementing this using Config.PasswordCredentialsToken. That was how I started in my local fork and didn't like it as much. I don't know if/how to re-open this CL, but I still think it's the most reasonable.

@adg adg reopened this Nov 3, 2016
@adg
Copy link
Contributor

adg commented Nov 3, 2016

This CL is still pending, right? https://go-review.googlesource.com/c/23834/

@rakyll
Copy link
Contributor

rakyll commented Nov 3, 2016

Even though we promised not to break any APIs, I am suggesting to remove the Config.PasswordCredentialsToken if we merge the passwordcredentials package. I do not think the current API is widely used and keeping the library orthogonal is more valuable than breaking a few users.

@josephholsten
Copy link
Contributor Author

Yes, I am still using this approach locally. I'm still interested in this CL.

@josephholsten
Copy link
Contributor Author

@adg is there anything I need to do to move this forward?

@adg
Copy link
Contributor

adg commented Nov 18, 2016

@rakyll what do you think?

@rakyll
Copy link
Contributor

rakyll commented Nov 18, 2016

I am in favor of adding a deprecation notice to https://godoc.org/golang.org/x/oauth2#Config.PasswordCredentialsToken and go with @josephholsten's package.

@josephholsten
Copy link
Contributor Author

@rakyll @adg anything you'd like me to do?

@adg
Copy link
Contributor

adg commented Feb 23, 2017

What @rakyll suggests sounds good to me. Whoever wants to do that can do it.

@rakyll
Copy link
Contributor

rakyll commented Feb 23, 2017

@josephholsten, I left comments on your change at https://go-review.googlesource.com/c/23834/ a while ago. Can you take a look at those?

@josephholsten
Copy link
Contributor Author

@rakyll sorry, I hadn't pushed my changes when I made that comment. Care to give it another look?

@smitt04
Copy link

smitt04 commented Sep 9, 2021

I would like to use this package, is this every going to move forward?

@joefitzgerald
Copy link

For anyone who is interested, a couple of years ago I extracted this PR into a package that you can use to provide the required functionality, pending the merge of this PR: https://github.com/joefitzgerald/passwordcredentials

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

5 participants