-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Feat(api-platform): handle scope on endpoints #33756
Feat(api-platform): handle scope on endpoints #33756
Conversation
5394ed4
to
bf4e8a5
Compare
src/PrestaShopBundle/Security/OAuth2/Repository/NullScopeRepository.php
Outdated
Show resolved
Hide resolved
bf4e8a5
to
6f20d74
Compare
...staShopBundle/ApiPlatform/Decorator/AttributesResourceMetadataCollectionFactoryDecorator.php
Show resolved
Hide resolved
...staShopBundle/ApiPlatform/Decorator/AttributesResourceMetadataCollectionFactoryDecorator.php
Outdated
Show resolved
Hide resolved
...staShopBundle/ApiPlatform/Decorator/AttributesResourceMetadataCollectionFactoryDecorator.php
Outdated
Show resolved
Hide resolved
...staShopBundle/ApiPlatform/Decorator/AttributesResourceMetadataCollectionFactoryDecorator.php
Outdated
Show resolved
Hide resolved
src/PrestaShopBundle/Security/OAuth2/Repository/NullScopeRepository.php
Outdated
Show resolved
Hide resolved
src/PrestaShopBundle/Security/OAuth2/Repository/NullScopeRepository.php
Outdated
Show resolved
Hide resolved
src/PrestaShopBundle/Security/OAuth2/Repository/ScopeEntity.php
Outdated
Show resolved
Hide resolved
6f20d74
to
5d39bef
Compare
...staShopBundle/ApiPlatform/Decorator/AttributesResourceMetadataCollectionFactoryDecorator.php
Outdated
Show resolved
Hide resolved
...staShopBundle/ApiPlatform/Decorator/AttributesResourceMetadataCollectionFactoryDecorator.php
Show resolved
Hide resolved
3b9d978
to
f714255
Compare
f714255
to
6b8de8c
Compare
6b8de8c
to
a298f72
Compare
54ad542
to
ef98b68
Compare
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 @tleon
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.
LGTM, and tested on my side as asked.
All working in the right way!
Before merge, @tleon can you check the failed job in your UI tests: https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/6097740635/job/16579414231 ? |
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.
@boherm @tleon Indeed as long as these tests are red we can't merge the PR or it will break all the following UI tests
Besides it's the tests related to API and I restarted them a few times so there are probably some stuff to fix
It's in the tests related to Keycloak so my guess is that the token returned by Keycload has no scopes defined (which makes sense since he doesn't know the, it doesn't provide default scopes and we also don't request for scopes in the token request)
195b443
to
b94b2ef
Compare
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 @tleon
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.
OK for UI Tests
(That disables UI Test for external auth server and will enable it in #33946)
(Ping @boubkerbribri)
thanks @tleon ! |
Last run to be sure https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/6234867078 |
Last run green (except sanity tests but not related to the PR) Thanks @tleon |
Modifications have been addressed
More informations on how to get your bearer token :
You need to add a return statement at the start of the onKernelRequest method of the SslMiddleware.php file. If you don't do this postman won't be able to handle the current ssl protocol.