Skip to content

Commit b407a4e

Browse files
committed
Support Keycloak 21.x
1 parent 43a6799 commit b407a4e

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/keycloak/keycloak:20.0.3
1+
FROM quay.io/keycloak/keycloak:21.1.1
22

33
#COPY target/lib/*.jar ./providers/
44
COPY target/keycloak-spi-trusted-device-*-SNAPSHOT.jar /opt/keycloak/providers/keycloak-spi-trusted-device.jar

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616
<maven.compiler.source>1.8</maven.compiler.source>
1717
<maven.compiler.target>1.8</maven.compiler.target>
18-
<keycloak.version>20.0.3</keycloak.version>
18+
<keycloak.version>21.1.1</keycloak.version>
1919
<lombok.version>1.18.24</lombok.version>
2020
<reproducible-build-maven-plugin.version>0.13</reproducible-build-maven-plugin.version>
2121
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>

realm-test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,12 +1731,12 @@
17311731
"cibaInterval": "5",
17321732
"realmReusableOtpCode": "false"
17331733
},
1734-
"keycloakVersion": "20.0.3",
1734+
"keycloakVersion": "21.1.1",
17351735
"userManagedAccessAllowed": false,
17361736
"clientProfiles": {
17371737
"profiles": []
17381738
},
17391739
"clientPolicies": {
17401740
"policies": []
17411741
}
1742-
}
1742+
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ private static void addCookie(KeycloakSession session, RealmModel realm, String
5050
maxAge,
5151
secure,
5252
true,
53-
sameSiteValue
53+
sameSiteValue,
54+
session
5455
);
5556
}
5657

5758
public static TrustedDeviceToken getCookie(KeycloakSession session) {
58-
Set<String> cookieValues = CookieHelper.getCookieValue(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)