-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix/auth oauth2 Password grant_type now sends credentials in x-www-form-urlencoded form #832
Fix/auth oauth2 Password grant_type now sends credentials in x-www-form-urlencoded form #832
Conversation
Now : If existing, NbAuthResult contains backend error description other Changes requested by Dmitry (first review)
Now : If existing, NbAuthResult contains backend error description other Changes requested by Dmitry (first review) +tslint missing trailing comma arghhh
…strategy used to create the token (future use)
The token now contains ownerStrategyName, with is a back link to the strategy used to create the token (future use). BREAKING CHANGE : NbAuthCreateToken (token.ts) now takes a third parameter, which is the ownerStrategyName Tokens are created by strategies that are called from services, so it is *potentially* a breaking change.
The token now contains ownerStrategyName, with is a back link to the strategy used to create the token (future use). updated unit tests files and oauth2-password-login.component (breaking change below) BREAKING CHANGE : NbAuthCreateToken (token.ts) now takes a third parameter, which is the ownerStrategyName Tokens are created by strategies that are called from services, so it is *potentially* a breaking change.
removed useless code and cleaned one unit test file BREAKING CHANGE : NbAuthCreateToken (token.ts) now takes a third parameter, which is the ownerStrategyName Tokens are created by strategies that are called from services, so it is *potentially* a breaking change.
Returns always true so that NO url is intercepted => the user writes the filter according to the doc (Auth urls MUST be filtered) and injects it in his own auth_module
…h grant-type='password' must provide username to the auth server and not email. Corrects issue #653
…h grant-type='password' MAY provide the scope parameter =>Corrects completely issue #653
…*() methods of authService Updated unit tests
# Conflicts: # src/framework/auth/services/auth.spec.ts
# Conflicts: # src/framework/auth/services/auth.spec.ts
…form-urlencoded string Unit tests updated for corresponding strategy Resolves #716
@nnixaa did you have a look at that ? |
Hi @alain-charles, sorry, will have a look later this week. |
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.
@alain-charles sorry for the delay!
headers = headers.append('Content-Type', 'application/x-www-form-urlencoded'); | ||
|
||
return this.http.post(url, this.buildPasswordRequestData(username, password), | ||
{headers: headers}) |
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.
there is no need to a new line here and also the spaces { headers: this.buildAuthHeader() }
…th-oAuth2-password-form-encoding
…coding' into fix/auth-oAuth2-password-form-encoding
@nnixaa i'ms sorry, i had corrected that but it must have been corrupted by some undo command :) |
…th-oAuth2-password-form-encoding
Codecov Report
@@ Coverage Diff @@
## master #832 +/- ##
========================================
- Coverage 76.99% 76.8% -0.2%
========================================
Files 200 201 +1
Lines 5947 5966 +19
Branches 451 455 +4
========================================
+ Hits 4579 4582 +3
- Misses 1262 1278 +16
Partials 106 106
|
Please read and mark the following check list before creating a pull request:
Short description of what this resolves:
Fixes #716