Skip to content

Upgrade to Keycloak 25 #5

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3.9.5-eclipse-temurin-17 AS build
FROM maven:3.9.7-eclipse-temurin-21 AS build

WORKDIR /home/app/src

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Keycloak actions token

This extension exposes a custom realm resource to manage action tokens in keycloak.
This extension exposes a custom realm resource to manage action tokens in Keycloak.

## Build the example
```
Expand All @@ -9,9 +9,9 @@ mvn clean verify

## Deploy the example
### Wildfly
Copy the `.jar` into the keycloak directory `standalone/deployments`
Copy the `.jar` into the Keycloak directory `standalone/deployments`
### Quarkus
Copy the `.jar` into the keycloak directory `providers`
Copy the `.jar` into the Keycloak directory `providers`

## Routes

Expand Down
17 changes: 12 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
<artifactId>actions-token</artifactId>
<groupId>io.wiremind.keycloak.actionstoken</groupId>
<packaging>jar</packaging>
<version>0.0.8</version>
<version>0.0.9</version>

<properties>
<java.version>17</java.version>
<keycloak.version>22.0.5</keycloak.version>
<java.version>21</java.version>
<keycloak.version>25.0.0</keycloak.version>
<version.compiler.maven.plugin>3.8.1</version.compiler.maven.plugin>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<gson.version>2.10.1</gson.version>
<resteasy.version>3.12.0</resteasy.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -43,6 +44,12 @@
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest</artifactId>
<version>${resteasy.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import jakarta.ws.rs.core.UriInfo;

import org.jboss.logging.Logger;
import org.jboss.resteasy.annotations.cache.NoCache;
import org.jboss.resteasy.reactive.NoCache;
import org.keycloak.TokenCategory;
import org.keycloak.authentication.actiontoken.execactions.ExecuteActionsActionToken;
import org.keycloak.common.util.Time;
Expand Down Expand Up @@ -76,7 +76,7 @@ public Response getActionToken(

if (!auth.getRealm().equals(realmManager.getKeycloakAdminstrationRealm())
&& !auth.getRealm().equals(realm)) {
throw new org.keycloak.services.ForbiddenException();
throw new ForbiddenException();
}

realmAuth = AdminPermissions.evaluator(session, realm, auth);
Expand Down