Skip to content

Commit d7535e8

Browse files
authored
Merge pull request #214 from os2display/feature/2571-nullable-endSessionUrl
2571: Make endSessionUrl nullable
2 parents c33654d + 6c93fc6 commit d7535e8

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
- [#214](https://github.com/os2display/display-api-service/pull/214)
8+
- Updated endSessionUrl to be nullable.
79
- [#193](https://github.com/os2display/display-api-service/pull/193)
810
- Adds support for interactive slides.
911
- Adds interactivity for creating quick bookings from a slide through Microsoft Graph.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ classDiagram
8989

9090
## Development Setup
9191

92-
A `docker-compose.yml` file with a PHP 8.0 image is included in this project.
92+
A `docker-compose.yml` file with a PHP 8.3 image is included in this project.
9393
To install the dependencies you can run
9494

9595
```shell

src/Controller/AuthOidcController.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,21 @@ public function getUrls(Request $request, SessionInterface $session): Response
7272
$session->set('oauth2state', $state);
7373
$session->set('oauth2nonce', $nonce);
7474

75+
// We allow end session endpoint to not be set.
76+
try {
77+
$endSessionUrl = $provider->getEndSessionUrl();
78+
} catch (ItkOpenIdConnectException $e) {
79+
$endSessionUrl = null;
80+
}
81+
7582
$data = [
7683
'authorizationUrl' => $provider->getAuthorizationUrl([
7784
'state' => $state,
7885
'nonce' => $nonce,
7986
'response_type' => 'code',
8087
'scope' => 'openid email profile',
8188
]),
82-
'endSessionUrl' => $provider->getEndSessionUrl(),
89+
'endSessionUrl' => $endSessionUrl,
8390
];
8491

8592
return new JsonResponse($data);

0 commit comments

Comments
 (0)