Skip to content

Commit 531b9ce

Browse files
committed
Merge branch 'release/2.1.0'
2 parents dce7fcc + cbb856a commit 531b9ce

27 files changed

+1282
-21
lines changed

.env

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,25 @@ CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
4141
###> App ###
4242
APP_DEFAULT_DATE_FORMAT='Y-m-d\TH:i:s.v\Z'
4343
APP_ACTIVATION_CODE_EXPIRE_INTERNAL=P2D
44+
APP_KEY_VAULT_SOURCE=ENVIRONMENT
45+
APP_KEY_VAULT_JSON="{}"
4446
###< App ###
4547

4648
###> lexik/jwt-authentication-bundle ###
4749
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
4850
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
4951
JWT_PASSPHRASE=APP_JWT_PASSPHRASE
50-
JWT_TOKEN_TTL=3600 # 1 hour
51-
JWT_SCREEN_TOKEN_TTL=1296000 # 15 days
52+
# 1 hour
53+
JWT_TOKEN_TTL=3600
54+
# 15 days
55+
JWT_SCREEN_TOKEN_TTL=1296000
5256
###< lexik/jwt-authentication-bundle ###
5357

5458
###> gesdinet/jwt-refresh-token-bundle ###
55-
JWT_REFRESH_TOKEN_TTL=7200 # 2 hours
56-
JWT_SCREEN_REFRESH_TOKEN_TTL=2592000 # 30 days
59+
# 2 hours
60+
JWT_REFRESH_TOKEN_TTL=7200
61+
# 30 days
62+
JWT_SCREEN_REFRESH_TOKEN_TTL=2592000
5763
###< gesdinet/jwt-refresh-token-bundle ###
5864

5965
###> itk-dev/openid-connect-bundle ###
@@ -75,6 +81,7 @@ EXTERNAL_OIDC_REDIRECT_URI=EXTERNAL_OIDC_REDIRECT_URI
7581
EXTERNAL_OIDC_LEEWAY=30
7682
EXTERNAL_OIDC_HASH_SALT=
7783
EXTERNAL_OIDC_CLAIM_ID=signinname
84+
###< itk-dev/openid-connect-bundle ###
7885

7986
# cli redirect url
8087
OIDC_CLI_REDIRECT=APP_CLI_REDIRECT_URI
@@ -84,3 +91,4 @@ OIDC_CLI_REDIRECT=APP_CLI_REDIRECT_URI
8491
REDIS_CACHE_PREFIX=DisplayApiService
8592
REDIS_CACHE_DSN=redis://redis:6379/0
8693
###< redis ###
94+

.env.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ DATABASE_URL="mysql://root:password@mariadb:3306/db_test?serverVersion=mariadb-1
1111
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
1212
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
1313
JWT_PASSPHRASE=APP_JWT_PASSPHRASE
14-
JWT_TOKEN_TTL=1800 # 30 min
15-
JWT_SCREEN_TOKEN_TTL=43200 # 12 hours
14+
JWT_TOKEN_TTL=1800
15+
JWT_SCREEN_TOKEN_TTL=43200
1616
###< lexik/jwt-authentication-bundle ###
1717

1818
###> gesdinet/jwt-refresh-token-bundle ###
19-
JWT_REFRESH_TOKEN_TTL=3600 # 1 hour
20-
JWT_SCREEN_REFRESH_TOKEN_TTL=86400 # 24 hours
19+
JWT_REFRESH_TOKEN_TTL=3600
20+
JWT_SCREEN_REFRESH_TOKEN_TTL=86400
2121
###< gesdinet/jwt-refresh-token-bundle ###

CHANGELOG.md

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

55
## [Unreleased]
66

7+
## [2.1.0] - 2024-10-23
8+
9+
- [#214](https://github.com/os2display/display-api-service/pull/214)
10+
- Updated endSessionUrl to be nullable.
11+
- [#193](https://github.com/os2display/display-api-service/pull/193)
12+
- Adds support for interactive slides.
13+
- Adds interactivity for creating quick bookings from a slide through Microsoft Graph.
14+
- Adds KeyVaultService that can serve key-value entries from the environment for storing secrets.
15+
716
## [2.0.7] - 2024-08-20
817

918
- [#211](https://github.com/os2display/display-api-service/pull/211)

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

config/api_platform/slide.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,26 @@ resources:
108108
tags:
109109
- Slides
110110

111+
_api_Slide_perform_action:
112+
input: App\Dto\InteractiveSlideActionInput
113+
class: ApiPlatform\Metadata\POST
114+
method: POST
115+
uriTemplate: '/slides/{id}/action'
116+
controller: App\Controller\InteractiveController
117+
openapiContext:
118+
description: Perform an action for a slide.
119+
summary: Performs an action for a slide.
120+
tags:
121+
- Slides
122+
parameters:
123+
- schema:
124+
type: string
125+
format: ulid
126+
pattern: "^[A-Za-z0-9]{26}$"
127+
name: id
128+
in: path
129+
required: true
130+
111131
# Our DTO must be a resource to get a proper URL
112132
# @see https://stackoverflow.com/a/75705084
113133
# @see https://github.com/api-platform/core/issues/5451

config/packages/cache.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ framework:
2222
adapter: cache.adapter.redis
2323
# Default expire set to 1 day
2424
default_lifetime: 86400
25+
26+
# Creates a "interactive_slide.cache" service
27+
interactive_slide.cache:
28+
adapter: cache.adapter.redis
29+
# Default expire set to 12 hours
30+
default_lifetime: 43200

config/packages/dev/monolog.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ monolog:
55
path: "%kernel.logs_dir%/%kernel.environment%.log"
66
level: debug
77
channels: ["!event", "!doctrine", "!deprecation"]
8+
# uncomment to get logging in your browser
9+
# you may have to allow bigger header sizes in your Web server configuration
10+
#firephp:
11+
# type: firephp
12+
# level: info
13+
#chromephp:
14+
# type: chromephp
15+
# level: info
816
console:
917
type: console
1018
process_psr_3_messages: false

config/services.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ services:
3030
- { name: api_platform.doctrine.orm.query_extension.collection }
3131
- { name: api_platform.doctrine.orm.query_extension.item }
3232

33+
App\InteractiveSlide\InteractiveSlideInterface:
34+
tags: [app.interactive.interactive]
35+
3336
# Specify primary UserProviderInterface
3437
Symfony\Component\Security\Core\User\UserProviderInterface: '@security.user.provider.concrete.app_user_provider'
3538

@@ -48,6 +51,11 @@ services:
4851
Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface: '@Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationFailureHandler'
4952
Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface: '@Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationSuccessHandler'
5053

54+
App\Service\KeyVaultService:
55+
arguments:
56+
$keyVaultSource: '%env(string:APP_KEY_VAULT_SOURCE)%'
57+
$keyVaultArray: '%env(json:APP_KEY_VAULT_JSON)%'
58+
5159
App\Service\UserService:
5260
arguments:
5361
$hashSalt: '%env(EXTERNAL_OIDC_HASH_SALT)%'
@@ -81,6 +89,10 @@ services:
8189
arguments:
8290
- !tagged_iterator app.feed.feed_type
8391

92+
App\Service\InteractiveSlideService:
93+
arguments:
94+
- !tagged_iterator app.interactive.interactive
95+
8496
App\Security\ScreenAuthenticator:
8597
arguments:
8698
$jwtScreenRefreshTokenTtl: '%env(int:JWT_SCREEN_REFRESH_TOKEN_TTL)%'

migrations/Version20240403043527.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DoctrineMigrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Doctrine\Migrations\AbstractMigration;
9+
10+
/**
11+
* Auto-generated Migration: Please modify to your needs!
12+
*/
13+
final class Version20240403043527 extends AbstractMigration
14+
{
15+
public function getDescription(): string
16+
{
17+
return '';
18+
}
19+
20+
public function up(Schema $schema): void
21+
{
22+
// this up() migration is auto-generated, please modify it to your needs
23+
$this->addSql('CREATE TABLE interactive_slide (id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', tenant_id BINARY(16) NOT NULL COMMENT \'(DC2Type:ulid)\', version INT DEFAULT 1 NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', modified_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by VARCHAR(255) DEFAULT \'\' NOT NULL, modified_by VARCHAR(255) DEFAULT \'\' NOT NULL, configuration JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', implementation_class VARCHAR(255) NOT NULL, INDEX IDX_138E544D9033212A (tenant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
24+
$this->addSql('ALTER TABLE interactive_slide ADD CONSTRAINT FK_138E544D9033212A FOREIGN KEY (tenant_id) REFERENCES tenant (id)');
25+
}
26+
27+
public function down(Schema $schema): void
28+
{
29+
// this down() migration is auto-generated, please modify it to your needs
30+
$this->addSql('ALTER TABLE interactive_slide DROP FOREIGN KEY FK_138E544D9033212A');
31+
$this->addSql('DROP TABLE interactive_slide');
32+
}
33+
}

psalm-baseline.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,16 +495,10 @@
495495
</UndefinedDocblockClass>
496496
</file>
497497
<file src="src/Feed/KobaFeedType.php">
498-
<InvalidThrow>
499-
<code><![CDATA[throw new MissingFeedConfigurationException('Koba event_name is not string');]]></code>
500-
</InvalidThrow>
501498
<RiskyTruthyFalsyComparison>
502499
<code><![CDATA[$filterList]]></code>
503500
<code><![CDATA[$rewriteBookedTitles]]></code>
504501
</RiskyTruthyFalsyComparison>
505-
<UndefinedClass>
506-
<code><![CDATA[MissingFeedConfigurationException]]></code>
507-
</UndefinedClass>
508502
</file>
509503
<file src="src/Feed/SparkleIOFeedType.php">
510504
<UndefinedInterfaceMethod>

0 commit comments

Comments
 (0)