stable

Clone or download

Read-only

Allow API Client to request Mercure Token for Kanban

This patch allows any API Client to request a Mercure token for a specific Kanban that they have access to . This token enables them to listen to updates on the Kanban Testing can be done by : 1. Setting up mercure in your bash-web 2. setting feature_flag_enable_mercure_dev to 1 in bash-web 3. Go to any kanban, and replace the action parameter in the url by getJWT. 4. Open https://tuleap-web.tuleap-aio-dev.docker/.well-known/mercure/ui/, and change the token to the one you recieved in 3 , then subscribe to Kanban/$ID 5. Delete the kanban, you should receive the message Part of story #28301 Have Kanban realtime be Mercure based Change-Id: I739ed8d48587c3b72220bdf295599ea1b95374ca

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/REST/v1/Kanban/KanbanResource.php +1 −1 Go to diff View file
A plugins/agiledashboard/include/AgileDashboard/RealTime/MercureJWTController.php +74 −0 Go to diff View file
M plugins/agiledashboard/include/agiledashboardPlugin.php +16 −0 Go to diff View file
A plugins/agiledashboard/tests/unit/AgileDashboard/RealTime/MercureJWTControllerTest.php +130 −0 Go to diff View file
M src/common/JWT/generators/MercureJWTGenerator.php +5 −68 Go to diff View file
A src/common/JWT/generators/MercureJWTGeneratorBuilder.php +49 −0 Go to diff View file
A src/common/JWT/generators/MercureJWTGeneratorImpl.php +91 −0 Go to diff View file
A src/common/JWT/generators/NullMercureJWTGenerator.php +41 −0 Go to diff View file
M src/common/RealTimeMercure/ClientBuilder.php +3 −16 Go to diff View file
M src/common/RealTimeMercure/MercureClient.php +7 −3 Go to diff View file
A tests/unit/common/JWT/generators/GeneratorBuilderTest.php +92 −0 Go to diff View file
M tests/unit/common/JWT/generators/MercureJWTGeneratorTest.php +9 −9 Go to diff View file
M tests/unit/common/RealTimeMercure/ClientBuilderTest.php +6 −25 Go to diff View file
M tests/unit/common/RealTimeMercure/MercureClientTest.php +27 −3 Go to diff View file