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

example how to extend the UI with SPI #521

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Conversation

edewit
Copy link
Contributor

@edewit edewit commented Dec 15, 2023

This is an example of how to extend the admin ui by implementing the SPI.
Because this is not merged yet this PR is a draft

see keycloak/keycloak#23772

@hypery2k
Copy link

nice idea, really like it. I think would be extremly helpful for extensions.

Any timeplan in which Keycloak Version it will be available?

@edewit edewit marked this pull request as ready for review January 23, 2024 13:00
@edewit edewit self-assigned this Jan 23, 2024
@edewit edewit changed the base branch from latest to main January 24, 2024 12:00
@edewit edewit force-pushed the extend-ui-spi branch 2 times, most recently from f7c8b1a to d382874 Compare January 24, 2024 12:05
Copy link
Contributor

@hmlnarik hmlnarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes. It looks like a most welcome addition worth a quickstart.

Could you add more explanation on the methods in the added java classes - when they are called and what they do, to make them quick to grasp? Also an automated test needs to be added to check the quickstart works correctly.

extension/extend-admin-console-spi/pom.xml Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@hmlnarik hmlnarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test fails in the GHA, please fix. Perhaps the .github/scripts needs updating.

Please also see the inline comments

extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
extension/extend-admin-console-spi/README.md Outdated Show resolved Hide resolved
@edewit edewit force-pushed the extend-ui-spi branch 6 times, most recently from 2438df1 to 5845f67 Compare February 13, 2024 14:16
```

### Undeploy the quickstart
Remove sysout listener from your realm in the admin console, delete file providers/event-listener-sysout.jar and restart the server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the provider name

![todo detail screen](images/img_2.png, "Todo item details")

### Integration test of the Quickstart
Make sure you have a Keycloak server running with an admin user in the master realm or use the provided docker image.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not fit, the provider needs to be installed into the server first.

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

added explanation on where to find the examples

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

use the parent pom

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

added test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/README.md

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/README.md

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/src/test/java/org/keycloak/quickstart/ExtendAdminConsoleTest.java

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/README.md

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/README.md

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/README.md

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

Update extension/extend-admin-console-spi/README.md

Co-authored-by: Hynek Mlnařík <hmlnarik@users.noreply.github.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

update license header

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

removed deps

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

added providers jas for extend-admin-ui

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

added save todo test

added test for the realm attribute settings page

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
@hmlnarik hmlnarik merged commit a4a5054 into keycloak:main Feb 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants