Skip to content
Permalink
Browse files
Merge pull request #59 from amarkevich/FEDIZ-250
FEDIZ-250 Migrate to Spring 5 & Spring Security 5
  • Loading branch information
coheigea committed Aug 18, 2021
2 parents f5719b2 + 9767b15 commit ca38d91f1aa07de190472ee35bc934d2af5e1cac
Showing 13 changed files with 77 additions and 47 deletions.
@@ -48,10 +48,13 @@
<artifactId>fediz-cxf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -95,16 +95,10 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -59,9 +59,9 @@
<openjpa.version>3.1.2</openjpa.version>
<servlet.version>3.1.0</servlet.version>
<slf4j.version>1.7.30</slf4j.version>
<spring.version>4.3.30.RELEASE</spring.version>
<spring.version>5.3.8</spring.version>
<spring-ldap-core.version>2.3.4.RELEASE</spring-ldap-core.version>
<spring.security.version>4.2.20.RELEASE</spring.security.version>
<spring.security.version>5.5.1</spring.security.version>
<spring-webflow.version>2.5.1.RELEASE</spring-webflow.version>
<tomcat.version>9.0.50</tomcat.version>
<validation-api.version>2.0.2</validation-api.version>
@@ -209,6 +209,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.syncope.core</groupId>
<artifactId>syncope-core-persistence-jpa</artifactId>
<version>2.1.6</version>
<destFileName>fediz-oidc.war</destFileName>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<includes>org/springframework/orm/jpa/vendor/*.class</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -21,7 +21,6 @@

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@@ -39,7 +38,7 @@
public class BasicAuthEntryPoint extends BasicAuthenticationEntryPoint {

public void commence(HttpServletRequest request, HttpServletResponse response,
AuthenticationException ex) throws IOException, ServletException {
AuthenticationException ex) throws IOException {
if (ex instanceof AuthenticationServiceException) {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
response.flushBuffer();
@@ -49,7 +48,7 @@ public void commence(HttpServletRequest request, HttpServletResponse response,
}

@Override
public void afterPropertiesSet() throws Exception {
public void afterPropertiesSet() {
setRealmName("Fediz");
super.afterPropertiesSet();
}
@@ -1,2 +1,2 @@
user=password,ROLE_USER,enabled
admin=password,ROLE_USER,ROLE_ADMIN,enabled
user={noop}password,ROLE_USER,enabled
admin={noop}password,ROLE_USER,ROLE_ADMIN,enabled
@@ -56,6 +56,10 @@
<artifactId>cxf-rt-rs-security-cors</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
@@ -69,14 +69,6 @@
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf.fediz.systests</groupId>
@@ -59,6 +59,10 @@
<artifactId>ehcache</artifactId>
<version>${ehcache3.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
@@ -40,16 +40,20 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-sso-saml</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-sso-saml</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
@@ -58,7 +62,6 @@
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j.version}</version>
</dependency>

</dependencies>
<build>
<!-- Name of the generated WAR file -->
@@ -40,16 +40,20 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-sso-saml</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-sso-saml</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
@@ -58,7 +62,6 @@
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j.version}</version>
</dependency>

</dependencies>
<build>
<!-- Name of the generated WAR file -->
@@ -37,7 +37,7 @@
http://www.springframework.org/schema/util/spring-util-4.3.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd">

@@ -48,8 +48,12 @@
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>

0 comments on commit ca38d91

Please sign in to comment.