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

Fix jans client api update seleniumhq version from 3.x to 4.x #2110

Merged
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
4 changes: 4 additions & 0 deletions jans-client-api/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.time.Duration;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;

import static org.testng.Assert.fail;
Expand Down Expand Up @@ -161,7 +160,7 @@ private static String getAuthorizationUrl(String opHost, String clientId, String

private static String waitForPageSwitch(WebDriver currentDriver, String previousURL) {
Holder<String> currentUrl = new Holder<>();
WebDriverWait wait = new WebDriverWait(currentDriver, WAIT_OPERATION_TIMEOUT);
WebDriverWait wait = new WebDriverWait(currentDriver, Duration.ofSeconds(WAIT_OPERATION_TIMEOUT));
wait.until(d -> {
currentUrl.setT(d.getCurrentUrl());
return !currentUrl.getT().equals(previousURL);
Expand Down
37 changes: 13 additions & 24 deletions jans-client-api/gen-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,30 +212,6 @@
</plugins>
</build>
</profile>
<profile>
<id>test-dependencies</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>false</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

<dependencies>
Expand All @@ -249,6 +225,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
27 changes: 17 additions & 10 deletions jans-client-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<arquillian.ingwar.tools.version>1.2.0</arquillian.ingwar.tools.version>

<shrinkwrap.version>2.1.0</shrinkwrap.version>
<selenium.version>3.141.59</selenium.version>
<selenium.version>4.4.0</selenium.version>
<argLine>-Xms1024m -Xmx2048m -XX:+DisableExplicitGC</argLine>

<sonar.projectKey>JanssenProject_jans-client-api</sonar.projectKey>
Expand Down Expand Up @@ -261,12 +261,6 @@
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.11.1</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-cssparser</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>

<!-- selenium dependencies-->
<dependency>
Expand All @@ -283,19 +277,32 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.141.59</version>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>3.63.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-cssparser</artifactId>
<version>1.9.0</version>
<version>1.12.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.52.0</version>
<version>2.63.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
44 changes: 18 additions & 26 deletions jans-client-api/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.jans</groupId>
Expand Down Expand Up @@ -202,15 +215,18 @@
<artifactId>htmlunit-driver</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-cssparser</artifactId>
<scope>test</scope>
</dependency>

<!-- Others -->
Expand Down Expand Up @@ -822,29 +838,5 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>test-dependencies</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>false</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>io.jans</groupId>
<artifactId>jans-client-api-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ public static void fillRp(Rp rp, RegisterRequest request) {
rp.setRequestObjectEncryptionAlg(safeToString(request.getRequestObjectEncryptionAlg()));
rp.setRequestObjectEncryptionEnc(safeToString(request.getRequestObjectEncryptionEnc()));
rp.setDefaultMaxAge(safeToNumber(request.getDefaultMaxAge()));
rp.setRequireAuthTime(request.getRequireAuthTime());

if (!Strings.isNullOrEmpty(request.getInitiateLoginUri())) {
rp.setInitiateLoginUri(request.getInitiateLoginUri());
Expand Down Expand Up @@ -261,7 +260,6 @@ public static RegisterRequest createRegisterRequest(Rp rp) {
request.setRequestObjectEncryptionEnc(BlockEncryptionAlgorithm.fromName(rp.getRequestObjectEncryptionEnc()));

request.setDefaultMaxAge(safeToNumber(rp.getDefaultMaxAge()));
request.setRequireAuthTime(rp.getRequireAuthTime());

if (!Strings.isNullOrEmpty(rp.getInitiateLoginUri())) {
request.setInitiateLoginUri(rp.getInitiateLoginUri());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,6 @@ private RegisterRequest createRegisterClientRequest(RegisterSiteParams params, S
request.setDefaultMaxAge(params.getDefaultMaxAge());
}

if (params.getRequireAuthTime() != null) {
request.setRequireAuthTime(params.getRequireAuthTime());
}

if (!Strings.isNullOrEmpty(params.getInitiateLoginUri())) {
request.setInitiateLoginUri(params.getInitiateLoginUri());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@ private RegisterRequest createRegisterClientRequest(Rp rp, UpdateSiteParams para
request.setDefaultMaxAge(params.getDefaultMaxAge());
}

if (params.getRequireAuthTime() != null) {
request.setRequireAuthTime(params.getRequireAuthTime());
}

if (!Strings.isNullOrEmpty(params.getInitiateLoginUri())) {
request.setInitiateLoginUri(params.getInitiateLoginUri());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public void testRegisterRequestMapper() throws IOException {
assertEquals(request.getRequestObjectEncryptionAlg().toString(), rp.getRequestObjectEncryptionAlg());
assertEquals(request.getRequestObjectEncryptionEnc().toString(), rp.getRequestObjectEncryptionEnc());
assertEquals(request.getDefaultMaxAge(), rp.getDefaultMaxAge());
assertEquals(request.getRequireAuthTime(), rp.getRequireAuthTime());
assertEquals(request.getInitiateLoginUri(), rp.getInitiateLoginUri());
assertEquals(Jackson2.createRpMapper().readTree(Jackson2.serializeWithoutNulls(request.getAuthorizedOrigins())),
Jackson2.createRpMapper().readTree(Jackson2.serializeWithoutNulls(rp.getAuthorizedOrigins())));
Expand Down Expand Up @@ -137,7 +136,6 @@ public void testRegisterRequestMapper() throws IOException {
assertEquals(newRp.getRequestObjectEncryptionAlg(), rp.getRequestObjectEncryptionAlg());
assertEquals(newRp.getRequestObjectEncryptionEnc(), rp.getRequestObjectEncryptionEnc());
assertEquals(newRp.getDefaultMaxAge(), rp.getDefaultMaxAge());
assertEquals(newRp.getRequireAuthTime(), rp.getRequireAuthTime());
assertEquals(newRp.getInitiateLoginUri(), rp.getInitiateLoginUri());
assertEquals(Jackson2.createRpMapper().readTree(Jackson2.serializeWithoutNulls(newRp.getAuthorizedOrigins())),
Jackson2.createRpMapper().readTree(Jackson2.serializeWithoutNulls(rp.getAuthorizedOrigins())));
Expand Down