diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c1535e1..8b773a8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,6 +4,8 @@ on: push: tags: - '*' + branches: + - "0.0.8" jobs: build: diff --git a/Dockerfile b/Dockerfile index 9312b4d..0a99142 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.8.5-jdk-11-slim AS build +FROM maven:3.9.5-eclipse-temurin-17 AS build WORKDIR /home/app/src diff --git a/pom.xml b/pom.xml index ff6213f..9f8ce23 100644 --- a/pom.xml +++ b/pom.xml @@ -5,17 +5,17 @@ 4.0.0 actions-token - org.jboss.aerogear + io.wiremind.keycloak.actionstoken jar - 0.0.7 + 0.0.8 - 11 - 15.0.2 - 3.5.1 - 11 - 11 - 2.9.0 + 17 + 22.0.5 + 3.8.1 + 17 + 17 + 2.10.1 @@ -56,7 +56,7 @@ org.codehaus.mojo properties-maven-plugin - 1.0.0 + 1.2.1 generate-resources @@ -72,7 +72,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.1 + 3.5.1 package @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.3.0 @@ -96,4 +96,4 @@ - \ No newline at end of file + diff --git a/src/main/java/com/github/maxime1907/keycloak/actions/token/ActionsTokenResource.java b/src/main/java/com/github/maxime1907/keycloak/actions/token/ActionsTokenResource.java index 1aee2f0..bc46dd7 100644 --- a/src/main/java/com/github/maxime1907/keycloak/actions/token/ActionsTokenResource.java +++ b/src/main/java/com/github/maxime1907/keycloak/actions/token/ActionsTokenResource.java @@ -4,20 +4,20 @@ import java.util.LinkedList; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.ForbiddenException; -import javax.ws.rs.NotAuthorizedException; -import javax.ws.rs.NotFoundException; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.ForbiddenException; +import jakarta.ws.rs.NotAuthorizedException; +import jakarta.ws.rs.NotFoundException; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.UriInfo; import org.jboss.logging.Logger; import org.jboss.resteasy.annotations.cache.NoCache; @@ -86,7 +86,7 @@ public Response getActionToken( ActionTokenRequest actionTokenRequest = null; try { Gson gson = new Gson(); - actionTokenRequest = gson.fromJson(jsonString, ActionTokenRequest.class); + actionTokenRequest = gson.fromJson(jsonString, ActionTokenRequest.class); } catch (IllegalArgumentException cause) { throw new WebApplicationException( ErrorResponse.error("Invalid json input.", Status.BAD_REQUEST)); @@ -119,7 +119,8 @@ public Response getActionToken( if (requiredActions.contains(RequiredAction.VERIFY_EMAIL.name()) && user.getEmail() == null) { - return ErrorResponse.error("User email missing", Status.BAD_REQUEST); + throw new WebApplicationException( + ErrorResponse.error("User email missing", Status.BAD_REQUEST)); } if (!user.isEnabled()) {