Skip to content

Commit 25740db

Browse files
committed
Merge branch '6.4.x'
2 parents d233b70 + 27c2a8a commit 25740db

13 files changed

+51
-5
lines changed

config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@
128128
import org.springframework.security.saml2.provider.service.authentication.TestSaml2RedirectAuthenticationRequests;
129129
import org.springframework.security.web.authentication.WebAuthenticationDetails;
130130
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
131+
import org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFoundException;
132+
import org.springframework.security.web.authentication.rememberme.CookieTheftException;
133+
import org.springframework.security.web.authentication.rememberme.InvalidCookieException;
134+
import org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException;
135+
import org.springframework.security.web.authentication.session.SessionAuthenticationException;
136+
import org.springframework.security.web.authentication.www.NonceExpiredException;
131137

132138
import static org.assertj.core.api.Assertions.assertThat;
133139
import static org.assertj.core.api.Assertions.fail;
@@ -328,6 +334,16 @@ class SpringSecurityCoreVersionSerializableTests {
328334
token.setDetails(details);
329335
return token;
330336
});
337+
generatorByClassName.put(PreAuthenticatedCredentialsNotFoundException.class,
338+
(r) -> new PreAuthenticatedCredentialsNotFoundException("message", new IOException("fail")));
339+
generatorByClassName.put(CookieTheftException.class, (r) -> new CookieTheftException("message"));
340+
generatorByClassName.put(InvalidCookieException.class, (r) -> new InvalidCookieException("message"));
341+
generatorByClassName.put(RememberMeAuthenticationException.class,
342+
(r) -> new RememberMeAuthenticationException("message", new IOException("fail")));
343+
generatorByClassName.put(SessionAuthenticationException.class,
344+
(r) -> new SessionAuthenticationException("message"));
345+
generatorByClassName.put(NonceExpiredException.class,
346+
(r) -> new NonceExpiredException("message", new IOException("fail")));
331347
}
332348

333349
@ParameterizedTest

web/src/main/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedCredentialsNotFoundException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,10 +16,15 @@
1616

1717
package org.springframework.security.web.authentication.preauth;
1818

19+
import java.io.Serial;
20+
1921
import org.springframework.security.core.AuthenticationException;
2022

2123
public class PreAuthenticatedCredentialsNotFoundException extends AuthenticationException {
2224

25+
@Serial
26+
private static final long serialVersionUID = 2026209817833032728L;
27+
2328
public PreAuthenticatedCredentialsNotFoundException(String msg) {
2429
super(msg);
2530
}

web/src/main/java/org/springframework/security/web/authentication/rememberme/CookieTheftException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,11 +16,16 @@
1616

1717
package org.springframework.security.web.authentication.rememberme;
1818

19+
import java.io.Serial;
20+
1921
/**
2022
* @author Luke Taylor
2123
*/
2224
public class CookieTheftException extends RememberMeAuthenticationException {
2325

26+
@Serial
27+
private static final long serialVersionUID = -7215039140728554850L;
28+
2429
public CookieTheftException(String message) {
2530
super(message);
2631
}

web/src/main/java/org/springframework/security/web/authentication/rememberme/InvalidCookieException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.security.web.authentication.rememberme;
1818

19+
import java.io.Serial;
20+
1921
/**
2022
* Exception thrown by a RememberMeServices implementation to indicate that a submitted
2123
* cookie is of an invalid format or has expired.
@@ -24,6 +26,9 @@
2426
*/
2527
public class InvalidCookieException extends RememberMeAuthenticationException {
2628

29+
@Serial
30+
private static final long serialVersionUID = -7952247791921087125L;
31+
2732
public InvalidCookieException(String message) {
2833
super(message);
2934
}

web/src/main/java/org/springframework/security/web/authentication/rememberme/RememberMeAuthenticationException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.security.web.authentication.rememberme;
1818

19+
import java.io.Serial;
20+
1921
import org.springframework.security.core.AuthenticationException;
2022

2123
/**
@@ -27,6 +29,9 @@
2729
*/
2830
public class RememberMeAuthenticationException extends AuthenticationException {
2931

32+
@Serial
33+
private static final long serialVersionUID = 7028526952590057426L;
34+
3035
/**
3136
* Constructs a {@code RememberMeAuthenticationException} with the specified message
3237
* and root cause.

web/src/main/java/org/springframework/security/web/authentication/session/SessionAuthenticationException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.security.web.authentication.session;
1818

19+
import java.io.Serial;
20+
1921
import org.springframework.security.core.AuthenticationException;
2022

2123
/**
@@ -31,6 +33,9 @@
3133
*/
3234
public class SessionAuthenticationException extends AuthenticationException {
3335

36+
@Serial
37+
private static final long serialVersionUID = -2359914603911936474L;
38+
3439
public SessionAuthenticationException(String msg) {
3540
super(msg);
3641
}

web/src/main/java/org/springframework/security/web/authentication/www/NonceExpiredException.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.security.web.authentication.www;
1818

19+
import java.io.Serial;
20+
1921
import org.springframework.security.core.AuthenticationException;
2022

2123
/**
@@ -25,6 +27,9 @@
2527
*/
2628
public class NonceExpiredException extends AuthenticationException {
2729

30+
@Serial
31+
private static final long serialVersionUID = -3487244679050681257L;
32+
2833
/**
2934
* Constructs a <code>NonceExpiredException</code> with the specified message.
3035
* @param msg the detail message

0 commit comments

Comments
 (0)