-
Notifications
You must be signed in to change notification settings - Fork 112
Use scope asked by the client if any #64
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
Conversation
|
Your are right, this part must be updated, but your PR does not solve the problem and it creates a new (security) issue. According to the RFC, The requested scope MUST NOT include any scope not originally granted by the resource owner, and if omitted is treated as equal to the scope originally granted by the resource owner. With your PR, if a refresh token has "scope1 scope2" and the client request "scope4", it will receive an access token and a refresh token with "scope4". The logic should be: |
|
Thanks, you're absolutely right. I edited the class and updated the test. |
|
You should add some new test to verify the following cases:
|
|
Done :) |
|
Really like to see this PR merged as well. |
|
It can be merged. |
Conflicts: lib/OAuth2/OAuth2.php
|
Done |
Use scope asked by the client if any
done! |
RefreshTokens always had a default scope (the config supported_scopes in FosOAuthServerBundle) instead of the scope asked by the client if any.