Skip to content
Open
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
6 changes: 3 additions & 3 deletions focuspoints-client-core-servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</parent>

<artifactId>focuspoints-client-core-servlet</artifactId>
Expand All @@ -20,8 +20,8 @@
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import io.focuspoints.client.UrlCreator;
import java.util.function.Consumer;
import java.util.function.Function;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;
import org.apache.commons.lang3.StringUtils;

@WebListener
Expand Down
2 changes: 1 addition & 1 deletion focuspoints-client-core-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</parent>

<artifactId>focuspoints-client-core-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion focuspoints-client-core-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</parent>

<artifactId>focuspoints-client-core-spring</artifactId>
Expand Down
7 changes: 6 additions & 1 deletion focuspoints-client-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</parent>

<artifactId>focuspoints-client-core</artifactId>
Expand All @@ -23,6 +23,11 @@
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>io.mikael</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.focuspoints.client;

import javax.annotation.PostConstruct;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import org.apache.commons.lang3.Validate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ public void testConstructorWithBlankSecret() {
() -> new TestTokenBuilder(this.issuer, "")
);
}

@Test
public void testBuild() {
String expectedToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJ0ZXN0SXNzdWVyIiwiYWN0aW9uIjoidGVzdEFjdGlvbiJ9.qME7SDyRb3U-VxktQjK8E63V_eXcs4-KVMJmeCo9NP2I0LJZzGcKzYPXGLsKNLqemQ9Wu5h6iW_Qx6e9upxjEw";

TestTokenBuilder builder = spy(new TestTokenBuilder(this.issuer, this.secret));

String token = builder.build();

verify(builder).getAction();
verify(builder).buildInternal(notNull());

assertEquals(expectedToken, token);
}


private static class TestTokenBuilder extends AbstractImageTokenBuilder<TestTokenBuilder> {

Expand Down
22 changes: 14 additions & 8 deletions focuspoints-client-taglib/pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</parent>

<artifactId>focuspoints-client-taglib</artifactId>

<name>FocusPoints Client Taglib</name>
Expand All @@ -18,12 +18,18 @@
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client-core</artifactId>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>


<dependency>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
</dependency>


<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.TagSupport;
import jakarta.servlet.jsp.JspException;
import jakarta.servlet.jsp.PageContext;
import jakarta.servlet.jsp.tagext.TagSupport;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -67,7 +67,7 @@ protected URL getImageUrl() {
}
}

protected String getValue() throws JspException {
protected String getValue() {
if(!this.getConfiguration().isEnabled()) {
return this.getImageUrl().toExternalForm();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.focuspoints.client.util;

import javax.servlet.jsp.PageContext;
import jakarta.servlet.jsp.PageContext;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

Expand All @@ -13,16 +13,11 @@ public class TagUtils {
public static final String SCOPE_APPLICATION = "application";

public static int getScope(String scope) {
switch (scope) {
default:
case SCOPE_PAGE:
return PageContext.PAGE_SCOPE;
case SCOPE_REQUEST:
return PageContext.REQUEST_SCOPE;
case SCOPE_SESSION:
return PageContext.SESSION_SCOPE;
case SCOPE_APPLICATION:
return PageContext.APPLICATION_SCOPE;
}
return switch (scope) {
case SCOPE_REQUEST -> PageContext.REQUEST_SCOPE;
case SCOPE_SESSION -> PageContext.SESSION_SCOPE;
case SCOPE_APPLICATION -> PageContext.APPLICATION_SCOPE;
default -> PageContext.PAGE_SCOPE;
};
}
}
2 changes: 1 addition & 1 deletion focuspoints-client-thymeleaf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</parent>

<artifactId>focuspoints-client-thymeleaf</artifactId>
Expand Down
87 changes: 52 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.focuspoints</groupId>
<artifactId>focuspoints-client</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>

<packaging>pom</packaging>

Expand Down Expand Up @@ -35,41 +35,53 @@
<organizationUrl>https://tfe.nl/</organizationUrl>
</developer>
</developers>

<properties>
<java.version>1.8</java.version>

<!-- Update to Java 17 -->
<java.version>17</java.version>

<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>

<commons-lang3.version>3.10</commons-lang3.version>
<java-jwt.version>3.10.2</java-jwt.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Update dependencies to recent versions -->
<commons-lang3.version>3.13.0</commons-lang3.version>
<java-jwt.version>4.4.0</java-jwt.version>
<urlbuilder.version>2.0.9</urlbuilder.version>
<spring.version>5.2.4.RELEASE</spring.version>
<spring-boot.version>2.2.5.RELEASE</spring-boot.version>
<javax.servlet-api.version>4.0.1</javax.servlet-api.version>
<jsp-api.version>2.3.3</jsp-api.version>
<thymeleaf.version>3.0.11.RELEASE</thymeleaf.version>
<lombok.version>1.18.12</lombok.version>

<junit-platform.version>1.5.2</junit-platform.version>
<junit.version>5.6.0</junit.version>
<mockito.version>3.3.3</mockito.version>

<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-scm.version>1.11.2</maven-scm.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>

<!-- Update to Spring Framework 6.x and Spring Boot 3.x -->
<spring.version>6.1.8</spring.version>
<spring-boot.version>3.3.0</spring-boot.version>

<!-- Replace javax dependencies with Jakarta equivalents -->
<jakarta.servlet-api.version>6.0.0</jakarta.servlet-api.version>
<jakarta.annotation.version>2.1.1</jakarta.annotation.version>
<jsp-api.version>4.0.0</jsp-api.version> <!-- Jakarta JSP API -->

<!-- Thymeleaf with Spring 6 support -->
<thymeleaf.version>3.1.1.RELEASE</thymeleaf.version>

<!-- Lombok and test dependencies -->
<lombok.version>1.18.30</lombok.version>

<junit-platform.version>1.9.2</junit-platform.version>
<junit.version>5.9.2</junit.version>
<mockito.version>5.4.0</mockito.version>

<!-- Plugins updates -->
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
<maven-release-plugin.version>3.0.0</maven-release-plugin.version>
<maven-scm.version>1.12.0</maven-scm.version>
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
</properties>

<modules>
<module>focuspoints-client-core</module>
<module>focuspoints-client-core-spring</module>
Expand Down Expand Up @@ -126,15 +138,15 @@
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet-api.version}</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${jakarta.servlet-api.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>${jsp-api.version}</version>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -171,6 +183,11 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta.annotation.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down