diff --git a/CHANGELOG.md b/CHANGELOG.md index 61db8e13..e76d642c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- [#214](https://github.com/os2display/display-api-service/pull/214) + - Updated endSessionUrl to be nullable. - [#193](https://github.com/os2display/display-api-service/pull/193) - Adds support for interactive slides. - Adds interactivity for creating quick bookings from a slide through Microsoft Graph. diff --git a/README.md b/README.md index 3a24753b..ce4df7a3 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ classDiagram ## Development Setup -A `docker-compose.yml` file with a PHP 8.0 image is included in this project. +A `docker-compose.yml` file with a PHP 8.3 image is included in this project. To install the dependencies you can run ```shell diff --git a/src/Controller/AuthOidcController.php b/src/Controller/AuthOidcController.php index c913d880..2cdb31bb 100644 --- a/src/Controller/AuthOidcController.php +++ b/src/Controller/AuthOidcController.php @@ -72,6 +72,13 @@ public function getUrls(Request $request, SessionInterface $session): Response $session->set('oauth2state', $state); $session->set('oauth2nonce', $nonce); + // We allow end session endpoint to not be set. + try { + $endSessionUrl = $provider->getEndSessionUrl(); + } catch (ItkOpenIdConnectException $e) { + $endSessionUrl = null; + } + $data = [ 'authorizationUrl' => $provider->getAuthorizationUrl([ 'state' => $state, @@ -79,7 +86,7 @@ public function getUrls(Request $request, SessionInterface $session): Response 'response_type' => 'code', 'scope' => 'openid email profile', ]), - 'endSessionUrl' => $provider->getEndSessionUrl(), + 'endSessionUrl' => $endSessionUrl, ]; return new JsonResponse($data);