From 8b93a7b3bc325c9ef9b0606dac64e54a4e1e6975 Mon Sep 17 00:00:00 2001
From: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 28 Jul 2022 12:37:42 +0000
Subject: [PATCH] Update to Keycloak 19.0.0

---
 src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java |    2 +-
 pom.xml                                                       |   13 ++++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9d5518d..79f07bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,12 +22,13 @@
 
     <groupId>org.keycloak</groupId>
     <artifactId>keycloak-protocol-cas</artifactId>
-    <version>18.0.2</version>
+    <version>19.0.0</version>
     <name>Keycloak CAS Protocol</name>
     <description />
 
     <properties>
         <keycloak.version>${project.version}</keycloak.version>
+        <apache.httpcomponents.version>4.5.13</apache.httpcomponents.version>
         <jboss.logging.version>3.4.1.Final</jboss.logging.version>
         <jboss.logging.tools.version>2.2.1.Final</jboss.logging.tools.version>
         <junit.version>4.13.2</junit.version>
@@ -35,7 +36,7 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <maven.compiler.target>1.8</maven.compiler.target>
         <maven.compiler.source>1.8</maven.compiler.source>
-        <project.build.outputTimestamp>1656367890</project.build.outputTimestamp>
+        <project.build.outputTimestamp>1658998363</project.build.outputTimestamp>
     </properties>
 
     <dependencies>
@@ -58,6 +59,12 @@
             <scope>provided</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${apache.httpcomponents.version}</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.jboss.logging</groupId>
             <artifactId>jboss-logging</artifactId>
@@ -129,7 +136,7 @@
                 <configuration>
                     <archive>
                         <manifestEntries>
-                            <Dependencies>javax.xml.bind.api,org.keycloak.keycloak-core,org.keycloak.keycloak-server-spi,org.keycloak.keycloak-server-spi-private,org.keycloak.keycloak-services,org.keycloak.keycloak-saml-core,org.keycloak.keycloak-saml-core-public</Dependencies>
+                            <Dependencies>javax.xml.bind.api,org.keycloak.keycloak-core,org.keycloak.keycloak-server-spi,org.keycloak.keycloak-server-spi-private,org.keycloak.keycloak-services,org.keycloak.keycloak-saml-core,org.keycloak.keycloak-saml-core-public,org.apache.httpcomponents.httpclient</Dependencies>
                         </manifestEntries>
                     </archive>
                 </configuration>
diff --git a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
index 38d32f3..7eb67fc 100644
--- a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
+++ b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
@@ -97,7 +97,7 @@
         String service = authSession.getRedirectUri();
         //TODO validate service
 
-        OAuth2Code codeData = new OAuth2Code(UUID.randomUUID(),
+        OAuth2Code codeData = new OAuth2Code(UUID.randomUUID().toString(),
                 Time.currentTime() + userSession.getRealm().getAccessCodeLifespan(),
                 null, null, authSession.getRedirectUri(), null, null);
         String code = OAuth2CodeParser.persistCode(session, clientSession, codeData);

--
Gitblit v1.9.1