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

port to 25 #149

Merged
merged 2 commits into from
Jun 19, 2024
Merged
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
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Build and Test
uses: qcastel/github-actions-maven-cmd@master
env:
CI: ''
with:
maven-args: "clean install -Dmaven.test.skip=true -Ddockerfile.skip -DdockerCompose.skip -Djib.skip"

- name: Release
uses: qcastel/github-actions-maven-release@master
env:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 0 additions & 2 deletions ext/main/java/io/phasetwo/portal/PortalEnvironment.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.annotation.Generated;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)
Expand All @@ -25,7 +24,6 @@
"features",
"styles"
})
@Generated("jsonschema2pojo")
public class PortalEnvironment {

@JsonProperty("name")
Expand Down
2 changes: 0 additions & 2 deletions ext/main/java/io/phasetwo/portal/PortalFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.annotation.Generated;
import java.net.URI;
import org.keycloak.authentication.requiredactions.DeleteAccount;
import org.keycloak.common.Profile;
Expand Down Expand Up @@ -43,7 +42,6 @@
"orgSsoEnabled",
"orgEventsEnabled"
})
@Generated("jsonschema2pojo")
public class PortalFeatures {

public static String CONFIG_KEY(String property) {
Expand Down
10 changes: 2 additions & 8 deletions ext/main/java/io/phasetwo/portal/PortalResourceProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import lombok.extern.jbosslog.JBossLog;
import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.forms.login.freemarker.FreeMarkerLoginFormsProvider;
import org.keycloak.http.HttpRequest;
import org.keycloak.http.HttpResponse;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.services.Urls;
Expand Down Expand Up @@ -76,10 +74,7 @@ public Object getResource() {
}

private void setupCors() {
HttpRequest request = session.getContext().getHttpRequest();
HttpResponse response = session.getContext().getHttpResponse();
UriInfo uriInfo = session.getContext().getUri();
Cors.add(request).allowAllOrigins().allowedMethods(METHODS).auth().build(response);
Cors.builder().allowAllOrigins().allowedMethods(METHODS).auth().add();
}

private String getRealmName(RealmModel realm) {
Expand All @@ -98,8 +93,7 @@ private String getRealmName(RealmModel realm) {
@Path("{any:.*}")
public Response preflight() {
log.debug("CORS OPTIONS preflight request");
HttpRequest request = session.getContext().getContextObject(HttpRequest.class);
return Cors.add(request, Response.ok()).auth().allowedMethods(METHODS).preflight().build();
return Cors.builder().auth().allowedMethods(METHODS).preflight().add(Response.ok());
}

/**
Expand Down
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
</licenses>

<properties>
<java.version>17</java.version>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.java.package>io.phasetwo.portal</main.java.package>
<keycloak.version>24.0.0</keycloak.version>
<guava.version>32.0.0-jre</guava.version>
<keycloak.version>25.0.0</keycloak.version>
<guava.version>33.0.0-jre</guava.version>
<commons-lang3.version>3.11</commons-lang3.version>
<lombok.version>1.18.30</lombok.version>
<lombok.version>1.18.32</lombok.version>
<auto-service.version>1.1.1</auto-service.version>
<ossrh.url>https://s01.oss.sonatype.org</ossrh.url>
</properties>
Expand Down Expand Up @@ -176,6 +176,11 @@
</execution>
</executions>
</plugin>
<plugin> <!-- pretty up the code using google java standards `mvn fmt:format` -->
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.23</version>
</plugin>
</plugins>
<sourceDirectory>ext/main/java</sourceDirectory>
<resources>
Expand Down