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

Added basic support for oauth2-password-flow #1574

Closed

Conversation

pusherman
Copy link

Issue #807 - refresh_token is not yet support but basic the basic username/password auth works. Will continue to work on refresh_token as I have time.


var authParams = {
grant_type: 'password',
client_id: encodeURIComponent(clientId),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I suggest adding the client_secret here as well?
client_secret: encodeURIComponent(clientSecret),

at least it helped me using password flow with my REST API endpoint which requird a secret as well for token generation

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my last push I added the client secret to the auth headers for basic auth. I believe Spring Security requires basic auth for getting a token. Does it solve your problem as well @pkerspe or does it need to be a query param?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately cannot confirm that the basic auth header part would be working for me, was trying with your last push, but had to roll back. I am using the shaffer/oauth2-server-php by the way. Grant type is UserCredentials (password).

@pusherman
Copy link
Author

@pkerspe although the client_secret isn't in the spec for attributes in the password flow of oauth I've added it in for you as it won't hurt and it seems that some implementations require it. Hopefully this will work for you now.

@cbornet
Copy link
Contributor

cbornet commented Oct 2, 2015

What will happen if you have both "password" and "implicit" or "accessCode" oauth schemes defined ? See #1644

@frol
Copy link

frol commented Nov 20, 2015

I've been using it for a couple of weeks now, and this PR works fine! (However, login/password inputs are not styled/aligned at all, but it is not a big deal for me at this point.)

Anyone can test it using my example RESTful API server: https://github.com/frol/flask-restplus-server-example/

frol added a commit to frol/swagger-ui that referenced this pull request Jan 6, 2016
…and added a heap of fixes on top of that
frol added a commit to frol/swagger-ui that referenced this pull request Jan 6, 2016
…and added a heap of fixes on top of that
@frol frol mentioned this pull request Apr 30, 2016
@frol
Copy link

frol commented Apr 30, 2016

This PR is outdated and should be closed as well as mine #1853 since a great refactoring was done in #2014.

@webron
Copy link
Contributor

webron commented Jun 8, 2017

@pusherman - Definitely should have dealt with it a long time ago, but unfortunately, I didn't. We do appreciate the time you've taken into putting this up, but as you can tell, it is no longer relevant. Thanks again for taking the time and putting in the effort.

@webron webron closed this Jun 8, 2017
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

Successfully merging this pull request may close these issues.

5 participants