Skip to content

Commit

Permalink
Merge pull request #25 from swedenconnect/feature/IS-24-opensaml5
Browse files Browse the repository at this point in the history
IS-24 Port to OpenSAML5
  • Loading branch information
martin-lindstrom authored Sep 29, 2023
2 parents 78872b2 + 5337175 commit 2153e46
Show file tree
Hide file tree
Showing 95 changed files with 1,766 additions and 1,779 deletions.
179 changes: 83 additions & 96 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<groupId>se.swedenconnect.opensaml</groupId>
<artifactId>opensaml-swedish-eid</artifactId>
<packaging>jar</packaging>
<version>1.2.6-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>

<name>Sweden Connect :: Swedish eID OpenSAML extensions</name>
<description>OpenSAML 4.X extension library for the Swedish eID Framework</description>
<description>OpenSAML 5.X extension library for the Swedish eID Framework</description>
<url>https://github.com/swedenconnect/opensaml-swedish-eid</url>

<licenses>
Expand Down Expand Up @@ -44,14 +44,16 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<java.version>17</java.version>

<jackson.version>2.14.2</jackson.version>
<nimbus.version>9.31</nimbus.version>

<slf4j.version>1.7.36</slf4j.version>
<junit.version>4.13.2</junit.version>

<opensaml.version>5.0.0</opensaml.version>
<shib.support.version>9.0.0</shib.support.version>

<jackson.version>2.15.2</jackson.version>
<nimbus.version>9.35</nimbus.version>
<spring.version>6.0.12</spring.version>
<slf4j.version>2.0.7</slf4j.version>
<junit.version>5.10.0</junit.version>
</properties>

<repositories>
Expand Down Expand Up @@ -86,41 +88,32 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.cryptacular</groupId>
<artifactId>cryptacular</artifactId>
<version>1.2.5</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
</exclusion>
</exclusions>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.16.0</version>
</dependency>

<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>2.3.2</version>
<exclusions>
<!-- Version included has reported vulnerabilities -->
<exclusion>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
</exclusion>
</exclusions>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.2.2</version>
</dependency>

<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>6.4.0</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>


<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

</dependencies>

</dependencyManagement>
Expand All @@ -137,17 +130,13 @@
<dependency>
<groupId>se.swedenconnect.opensaml</groupId>
<artifactId>opensaml-security-ext</artifactId>
<version>[3.1.2,)</version>
<type>jar</type>
<scope>compile</scope>
<version>4.0.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>se.swedenconnect.opensaml</groupId>
<artifactId>opensaml-addons</artifactId>
<version>[1.2.6,)</version>
<type>jar</type>
<scope>compile</scope>
<version>2.0.0-SNAPSHOT</version>
</dependency>

<!-- JSON support -->
Expand All @@ -160,74 +149,64 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>[${jackson.version},)</version>
<scope>compile</scope>
<type>jar</type>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>[${jackson.version},)</version>
<scope>compile</scope>
<type>jar</type>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>[${jackson.version},)</version>
<scope>compile</scope>
<type>jar</type>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
<version>${jackson.version}</version>
</dependency>

<!-- For testing -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>[5.3.0, 6.0.0)</version>
<version>${spring.version}</version>
<scope>test</scope>
<type>jar</type>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>[5.3.0, 6.0.0)</version>
<version>${spring.version}</version>
<scope>test</scope>
<type>jar</type>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
<type>jar</type>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<type>jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>[5.3.0, 6.0.0)</version>
<scope>test</scope>
<type>jar</type>
</dependency>

</dependencies>

<build>
Expand All @@ -237,42 +216,35 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
<directory>test-output</directory>
</fileset>
</filesets>
</configuration>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.1</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce</id>
Expand All @@ -291,21 +263,36 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.0</version>
<configuration>
<doctitle>OpenSAML 4.X extension library for the Swedish eID Framework - ${project.version}</doctitle>
<windowtitle>OpenSAML 4.X extension library for the Swedish eID Framework - ${project.version}</windowtitle>
<doctitle>OpenSAML 5.X extension library for the Swedish eID Framework - ${project.version}</doctitle>
<windowtitle>OpenSAML 5.X extension library for the Swedish eID Framework - ${project.version}</windowtitle>
<links>
<link>https://build.shibboleth.net/nexus/content/sites/site/java-opensaml/4.2.0/apidocs/</link>
<link>https://build.shibboleth.net/nexus/content/sites/site/java-support/8.2.1/apidocs/</link>
<link>https://build.shibboleth.net/nexus/content/sites/site/java-opensaml/${opensaml.version}/apidocs/</link>
<link>https://build.shibboleth.net/nexus/content/sites/site/java-shib-shared/${shib.support.version}/apidocs/</link>
<link>https://docs.swedenconnect.se/opensaml-security-ext/javadoc/latest/</link>
<link>https://docs.swedenconnect.se/opensaml-addons/apidoc/</link>
</links>
<detectJavaApiLink>true</detectJavaApiLink>
<doclint>all,-missing</doclint>
</configuration>
</plugin>

</plugins>

<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
</includes>
</testResource>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
</testResources>

</build>

Expand Down Expand Up @@ -339,7 +326,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -354,7 +341,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
47 changes: 47 additions & 0 deletions src/main/java/se/swedenconnect/opensaml/sweid/LibraryVersion.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2023 Sweden Connect
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package se.swedenconnect.opensaml.sweid;

/**
* Internal class used for serialization across library classes.
*
* @author Martin Lindström
*/
public final class LibraryVersion {

private static final int MAJOR = 2;
private static final int MINOR = 0;
private static final int PATCH = 0;

/**
* Global serialization value for library classes.
*/
public static final long SERIAL_VERSION_UID = getVersion().hashCode();

/**
* Gets the version string.
*
* @return the version string
*/
public static String getVersion() {
return MAJOR + "." + MINOR + "." + PATCH;
}

// Hidden
private LibraryVersion() {
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2021 Sweden Connect
* Copyright 2016-2023 Sweden Connect
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@

/**
* XMLObject provider initializer for this module.
*
*
* @author Martin Lindström (martin@idsec.se)
*/
public class XMLObjectProviderInitializer extends AbstractXMLObjectProviderInitializer {
Expand All @@ -30,6 +30,7 @@ public class XMLObjectProviderInitializer extends AbstractXMLObjectProviderIniti
};

/** {@inheritDoc} */
@Override
protected String[] getConfigResources() {
return configs;
}
Expand Down
Loading

0 comments on commit 2153e46

Please sign in to comment.