Skip to content
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

2571: Make endSessionUrl nullable #214

Merged
merged 5 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion src/Controller/AuthOidcController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,21 @@ 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,
'nonce' => $nonce,
'response_type' => 'code',
'scope' => 'openid email profile',
]),
'endSessionUrl' => $provider->getEndSessionUrl(),
'endSessionUrl' => $endSessionUrl,
];

return new JsonResponse($data);
Expand Down
Loading