Skip to content

Commit 4ad0030

Browse files
committed
7.3.10855
1 parent 2b64aaf commit 4ad0030

File tree

32 files changed

+325
-225
lines changed

32 files changed

+325
-225
lines changed

Java/android/androidfsstorage/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
jarJar {
3535
rules = [
3636
'stax-api-1.0.1.jar' : 'javax.xml.** com.ithit.webdav.xml.@1',
37-
'webdav-server-7.3.10843.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
37+
'webdav-server-7.3.10855.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
3838
]
3939
}
4040

@@ -75,11 +75,11 @@ dependencies {
7575
implementation 'commons-io:commons-io:2.7'
7676
implementation 'com.google.code.gson:gson:2.8.9'
7777
implementation 'com.android.support:appcompat-v7:27.1.1'
78-
implementation('com.ithit.webdav.integration:android-integration:7.3.10843', {
78+
implementation('com.ithit.webdav.integration:android-integration:7.3.10855', {
7979
exclude group: 'org.nanohttpd', module: 'nanohttpd'
8080
})
8181
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
8282
jarJar 'stax:stax-api:1.0.1'
83-
jarJar 'com.ithit.webdav:webdav-server:7.3.10843'
83+
jarJar 'com.ithit.webdav:webdav-server:7.3.10855'
8484
testImplementation 'junit:junit:4.12'
8585
}

Java/jakarta/collectionsync/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>collectionsync-jakarta</artifactId>
9-
<version>7.3.10843</version>
9+
<version>7.3.10855</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>com.ithit.webdav.integration</groupId>
2727
<artifactId>jakarta-integration</artifactId>
28-
<version>7.3.10843</version>
28+
<version>7.3.10855</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>commons-lang</groupId>
@@ -60,7 +60,7 @@
6060
<dependency>
6161
<groupId>com.ithit.webdav</groupId>
6262
<artifactId>webdav-server</artifactId>
63-
<version>7.3.10843</version>
63+
<version>7.3.10855</version>
6464
</dependency>
6565
</dependencies>
6666

@@ -132,7 +132,7 @@
132132
<server>filesystem</server>
133133
<port>11021</port>
134134
<path>/</path>
135-
<warSourceDirectory>target/collectionsync-jakarta-7.3.10843</warSourceDirectory>
135+
<warSourceDirectory>target/collectionsync-jakarta-7.3.10855</warSourceDirectory>
136136
</configuration>
137137
</plugin>
138138
<plugin>

Java/jakarta/collectionsync/src/main/webapp/WEB-INF/wwwroot/js/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Java/jakarta/filesystemstorage/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>filesystemstorage</artifactId>
9-
<version>7.3.10843</version>
9+
<version>7.3.10855</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>com.ithit.webdav.integration</groupId>
2727
<artifactId>jakarta-integration</artifactId>
28-
<version>7.3.10843</version>
28+
<version>7.3.10855</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>commons-io</groupId>
@@ -66,7 +66,7 @@
6666
<dependency>
6767
<groupId>com.ithit.webdav</groupId>
6868
<artifactId>webdav-server</artifactId>
69-
<version>7.3.10843</version>
69+
<version>7.3.10855</version>
7070
</dependency>
7171
</dependencies>
7272

@@ -138,7 +138,7 @@
138138
<server>filesystem</server>
139139
<port>11021</port>
140140
<path>/</path>
141-
<warSourceDirectory>target/filesystemstorage-jakarta-7.3.10843</warSourceDirectory>
141+
<warSourceDirectory>target/filesystemstorage-jakarta-7.3.10855</warSourceDirectory>
142142
</configuration>
143143
</plugin>
144144
<plugin>

Java/jakarta/filesystemstorage/src/main/webapp/WEB-INF/wwwroot/js/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Java/jakarta/oraclestorage/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>oraclestorage</artifactId>
9-
<version>7.3.10843</version>
9+
<version>7.3.10855</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>com.ithit.webdav.integration</groupId>
1919
<artifactId>jakarta-integration</artifactId>
20-
<version>7.3.10843</version>
20+
<version>7.3.10855</version>
2121
</dependency>
2222
<dependency>
2323
<groupId>commons-dbcp</groupId>
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>com.ithit.webdav</groupId>
6767
<artifactId>webdav-server</artifactId>
68-
<version>7.3.10843</version>
68+
<version>7.3.10855</version>
6969
</dependency>
7070
</dependencies>
7171

@@ -90,7 +90,7 @@
9090
<goal>copy-resources</goal>
9191
</goals>
9292
<configuration>
93-
<outputDirectory>${project.build.directory}/oraclestorage-jakarta-7.3.10843/META-INF</outputDirectory>
93+
<outputDirectory>${project.build.directory}/oraclestorage-jakarta-7.3.10855/META-INF</outputDirectory>
9494
<overwrite>true</overwrite>
9595
<resources>
9696
<resource>
@@ -169,7 +169,7 @@
169169
<server>filesystem</server>
170170
<port>11021</port>
171171
<path>/</path>
172-
<warSourceDirectory>target/oraclestorage-jakarta-7.3.10843</warSourceDirectory>
172+
<warSourceDirectory>target/oraclestorage-jakarta-7.3.10855</warSourceDirectory>
173173
</configuration>
174174
</plugin>
175175
<plugin>

Java/jakarta/oraclestorage/src/main/webapp/WEB-INF/wwwroot/js/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Java/jakarta/springboot3fsstorage/pom.xml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,22 @@
44
<parent>
55
<groupId>org.springframework.boot</groupId>
66
<artifactId>spring-boot-starter-parent</artifactId>
7-
<version>3.4.4</version>
7+
<version>3.5.8</version>
88
<relativePath /> <!-- lookup parent from repository -->
99
</parent>
1010
<groupId>com.ithit.webdav.samples</groupId>
1111
<artifactId>springboot3fsstorage</artifactId>
12-
<version>7.3.10843</version>
12+
<version>7.3.10855</version>
1313
<name>springboot3fsstorage</name>
1414
<description>Demo project for Spring Boot 3</description>
1515

1616
<properties>
17-
<spring-cloud-azure.version>5.19.0</spring-cloud-azure.version>
1817
<java.version>17</java.version>
1918
<lucene-core.version>7.7.3</lucene-core.version>
2019
<tika-core.version>2.9.4</tika-core.version>
2120
</properties>
2221

2322
<dependencies>
24-
<dependency>
25-
<groupId>org.springframework.boot</groupId>
26-
<artifactId>spring-boot-starter-oauth2-client</artifactId>
27-
</dependency>
2823
<dependency>
2924
<groupId>org.springframework.boot</groupId>
3025
<artifactId>spring-boot-starter-web</artifactId>
@@ -34,10 +29,9 @@
3429
<artifactId>spring-boot-starter-websocket</artifactId>
3530
</dependency>
3631
<dependency>
37-
<groupId>com.azure.spring</groupId>
38-
<artifactId>spring-cloud-azure-starter-active-directory</artifactId>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-security</artifactId>
3934
</dependency>
40-
4135
<dependency>
4236
<groupId>org.springframework.boot</groupId>
4337
<artifactId>spring-boot-configuration-processor</artifactId>
@@ -53,12 +47,12 @@
5347
<dependency>
5448
<groupId>com.ithit.webdav</groupId>
5549
<artifactId>webdav-server</artifactId>
56-
<version>7.3.10843</version>
50+
<version>7.3.10855</version>
5751
</dependency>
5852
<dependency>
5953
<groupId>com.ithit.webdav.integration</groupId>
6054
<artifactId>jakarta-integration</artifactId>
61-
<version>7.3.10843</version>
55+
<version>7.3.10855</version>
6256
</dependency>
6357

6458
<dependency>
@@ -159,16 +153,4 @@
159153
</plugin>
160154
</plugins>
161155
</build>
162-
163-
<dependencyManagement>
164-
<dependencies>
165-
<dependency>
166-
<groupId>com.azure.spring</groupId>
167-
<artifactId>spring-cloud-azure-dependencies</artifactId>
168-
<version>${spring-cloud-azure.version}</version>
169-
<type>pom</type>
170-
<scope>import</scope>
171-
</dependency>
172-
</dependencies>
173-
</dependencyManagement>
174156
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package com.ithit.webdav.samples.springbootfs.configuration;
2+
3+
import java.io.IOException;
4+
import java.util.Arrays;
5+
import java.util.Collections;
6+
import java.util.Optional;
7+
8+
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
9+
import org.springframework.security.core.context.SecurityContextHolder;
10+
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
11+
import org.springframework.web.filter.OncePerRequestFilter;
12+
13+
import jakarta.servlet.FilterChain;
14+
import jakarta.servlet.ServletException;
15+
import jakarta.servlet.http.Cookie;
16+
import jakarta.servlet.http.HttpServletRequest;
17+
import jakarta.servlet.http.HttpServletResponse;
18+
19+
public class CookieAuthenticationFilter extends OncePerRequestFilter {
20+
21+
private final String authCookieName;
22+
23+
public CookieAuthenticationFilter(String authCookieName) {
24+
this.authCookieName = authCookieName;
25+
}
26+
27+
@Override
28+
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
29+
String token = Optional.ofNullable(request.getCookies())
30+
.stream()
31+
.flatMap(Arrays::stream)
32+
.filter(cookie -> authCookieName.equals(cookie.getName()))
33+
.findFirst()
34+
.map(Cookie::getValue)
35+
.orElse(null);
36+
37+
if (validateToken(token)) {
38+
// This is just an example
39+
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
40+
"user", null, Collections.emptyList());
41+
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
42+
SecurityContextHolder.getContext().setAuthentication(authentication);
43+
}
44+
45+
filterChain.doFilter(request, response);
46+
}
47+
48+
private boolean validateToken(String authCookie) {
49+
// Implement your custom token validation here (DB check, JWT decode, etc.)
50+
// Ensure you handle null token if necessary, though logic above extracts it first.
51+
52+
// Return true by default.
53+
return false;
54+
}
55+
}

0 commit comments

Comments
 (0)