stable

Clone or download

Read-only

Test that a user can approve an OAuth2 authorization request

In order to achieve that a new service is spawn with the E2E stack to play the role of the relying party. For now, this relying party is very basic as its only role is to redirect the user with a valid authorization request. The retrieved authorization code is not yet used, there is no proper validation that the OAuth2/OIDC flow is correct. To make easy to generate a certificate for the mandatory TLS usage and have the capability to reuse bits of the PHP ecosystem in the upcoming contributions, the service uses AmpPHP [0]. That makes possible to dynamically generate a certificate when the service starts without having to deal with the setup of more "standard" PHP stack (e.g. nginx/PHP FPM, Apache/mod_php) since only the PHP CLI is needed. Due to the nature of the test scenario, it has been needed to allow Cypress to do cross-origin requests. Part of story #14714: be an OpenID Connect provider [0] https://amphp.org/ Change-Id: Ifdf2995f3914644a8405d90df1ebc7130c73d240

Modified Files

Name
M plugins/oauth2_server/composer.json +5 −0 Go to diff View file
A plugins/oauth2_server/composer.lock +1440 −0 Go to diff View file
M plugins/oauth2_server/templates/authorization-form.mustache +1 −0 Go to diff View file
M plugins/oauth2_server/tests/e2e/cypress/cypress.json +2 −1 Go to diff View file
M plugins/oauth2_server/tests/e2e/cypress/cypress/integration/oidc-flow.spec.js +15 −2 Go to diff View file
A plugins/oauth2_server/tests/e2e/cypress/docker-compose.yml +12 −0 Go to diff View file
A plugins/oauth2_server/tests/e2e/cypress/rp-oidc/app.php +122 −0 Go to diff View file
A plugins/oauth2_server/tests/e2e/cypress/rp-oidc/rp-oidc.dockerfile +3 −0 Go to diff View file
M tests/e2e/full/run.sh +2 −2 Go to diff View file
M tests/e2e/full/wrap.sh +2 −1 Go to diff View file
M tests/e2e/full/wrap_for_dev_context.sh +4 −2 Go to diff View file