Skip to content

Commit 3f6183e

Browse files
committed
Remove kc20-compat which would become problematic to implement due to import changes
1 parent 6c2af8d commit 3f6183e

File tree

7 files changed

+9
-110
lines changed

7 files changed

+9
-110
lines changed

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v3
14-
- name: Set up JDK 8
14+
- name: Set up JDK 17
1515
uses: actions/setup-java@v3
1616
with:
17-
java-version: '8'
17+
java-version: '17'
1818
distribution: 'temurin'
1919
settings-path: ${{ github.workspace }}
2020
cache: 'maven'

compat-kc20/pom.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

compat-kc20/src/main/java/nl/wouterh/keycloak/trusteddevice/compat/kc20/KC20CookieHelper.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010

1111
<modules>
1212
<module>spi</module>
13-
<module>compat-kc20</module>
1413
</modules>
1514

1615
<name>keycloak-spi-trusted-device</name>
1716
<url>https://github.com/wouterh-dev/keycloak-spi-trusted-device</url>
1817

1918
<properties>
2019
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21-
<maven.compiler.source>1.8</maven.compiler.source>
22-
<maven.compiler.target>1.8</maven.compiler.target>
20+
<maven.compiler.source>17</maven.compiler.source>
21+
<maven.compiler.target>17</maven.compiler.target>
2322
<keycloak.version>22.0.3</keycloak.version>
24-
<lombok.version>1.18.24</lombok.version>
23+
<lombok.version>1.18.30</lombok.version>
2524
<reproducible-build-maven-plugin.version>0.16</reproducible-build-maven-plugin.version>
2625
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
2726
<auto-service.version>1.0.1</auto-service.version>

spi/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
<packaging>jar</packaging>
1616

1717
<dependencies>
18-
<dependency>
19-
<groupId>com.github.wouterh-dev</groupId>
20-
<artifactId>compat-kc20</artifactId>
21-
<version>${project.version}</version>
22-
</dependency>
2318
<dependency>
2419
<groupId>org.keycloak</groupId>
2520
<artifactId>keycloak-core</artifactId>

spi/src/main/java/nl/wouterh/keycloak/trusteddevice/util/CompatCookieHelper.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

spi/src/main/java/nl/wouterh/keycloak/trusteddevice/util/TrustedDeviceToken.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package nl.wouterh.keycloak.trusteddevice.util;
22

3-
import java.util.Set;
43
import jakarta.ws.rs.core.UriBuilder;
4+
import java.util.Set;
55
import lombok.Getter;
66
import lombok.NoArgsConstructor;
77
import lombok.Setter;
@@ -17,6 +17,7 @@
1717
import org.keycloak.models.RealmModel;
1818
import org.keycloak.models.UserModel;
1919
import org.keycloak.representations.JsonWebToken;
20+
import org.keycloak.services.util.CookieHelper;
2021

2122
@Getter
2223
@Setter
@@ -40,7 +41,7 @@ private static void addCookie(KeycloakSession session, RealmModel realm, String
4041

4142
ServerCookie.SameSiteAttributeValue sameSiteValue =
4243
secure ? ServerCookie.SameSiteAttributeValue.NONE : null;
43-
CompatCookieHelper.addCookie(
44+
CookieHelper.addCookie(
4445
COOKIE_NAME,
4546
value,
4647
path,
@@ -55,7 +56,7 @@ private static void addCookie(KeycloakSession session, RealmModel realm, String
5556
}
5657

5758
public static TrustedDeviceToken getCookie(KeycloakSession session) {
58-
Set<String> cookieValues = CompatCookieHelper.getCookieValue(session, COOKIE_NAME);
59+
Set<String> cookieValues = CookieHelper.getCookieValue(session, COOKIE_NAME);
5960
long time = Time.currentTime();
6061

6162
for (String cookieValue : cookieValues) {

0 commit comments

Comments
 (0)