-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 support for Resource Owner Password Credentials Grant #1163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this look pretty good.
I'm really surprised that handlePasswordGrant
is just a huge method with seemingly no shared code with the other token handlers. Can you comment on that before proceeding?
@@ -132,6 +135,9 @@ type Server struct { | |||
// If enabled, don't prompt user for approval after logging in through connector. | |||
skipApproval bool | |||
|
|||
// Used for password grant | |||
passwordConnector string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, this should be a connector.PasswordConnector
@@ -67,6 +67,9 @@ type Config struct { | |||
// Logging in implies approval. | |||
SkipApprovalScreen bool | |||
|
|||
// If set, the server will use this connector to handle password grants | |||
PasswordConnector string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, the connector should be initialized in cmd
so this would be of type connector.PasswordConnector
@snowzach are you still looking at this? Really excited for |
@pivotal-jwinters I wanted to finish this quick but the requested changes are a bigger refactor for the code than I have time at the moment. I will get to it eventually but $dayjob has taken over for the time being. Sorry. :( |
@snowzach no worries. If there's anything I can do to help let me know. |
@snowzach @ericchiang Any progress on this? I am really need on password grant. |
Hi, @bonifaido. I went through recent PRs and found you are assigned most of them so I figured you might be the right one to talk with. Sorry in advance. @pivotal-jwinters and I work for ConcourseCI who uses Dex as its auth backend. We are currently using our own fork of Dex and We would love to help here. Could you review the current status of the PR and provide some guidance? @snowzach if you dont mind could we pick up your work? If necessary we could move on to a new PR of Thx! |
@xtremerui by all means you may do anything you like this with merge. I kept meaning to come back to it but just never had time. |
Hi @xtremerui ! I think this PR looks quite good, we just need to rebase it on current master and resolve the conflicts. Would you guys do that? |
@bonifaido perfecto! We will update the PR and submit it again from our fork. |
#1621 is submitted. This PR might be closed. Thx! |
Close in favor of #1621 |
This PR adds support for Resource Owner Password Credentials Grant.
https://www.oauth.com/oauth2-servers/access-tokens/password-grant/
You enable it in the config by setting:
or replace local with whatever connector you wish to use for password grants.
You then request a token via a