Skip to content

Commit d233b70

Browse files
committed
Merge branch '6.4.x'
2 parents b9f3a28 + 841c03f commit d233b70

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@
116116
import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthenticationToken;
117117
import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken;
118118
import org.springframework.security.oauth2.server.resource.introspection.OAuth2IntrospectionAuthenticatedPrincipal;
119+
import org.springframework.security.saml2.Saml2Exception;
120+
import org.springframework.security.saml2.core.Saml2Error;
119121
import org.springframework.security.saml2.provider.service.authentication.DefaultSaml2AuthenticatedPrincipal;
120122
import org.springframework.security.saml2.provider.service.authentication.Saml2Authentication;
123+
import org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticationException;
121124
import org.springframework.security.saml2.provider.service.authentication.Saml2PostAuthenticationRequest;
122125
import org.springframework.security.saml2.provider.service.authentication.Saml2RedirectAuthenticationRequest;
123126
import org.springframework.security.saml2.provider.service.authentication.TestSaml2Authentications;
@@ -301,6 +304,10 @@ class SpringSecurityCoreVersionSerializableTests {
301304
(r) -> new LdapAuthority("USER", "username", Map.of("attribute", List.of("value1", "value2"))));
302305

303306
// saml2-service-provider
307+
generatorByClassName.put(Saml2AuthenticationException.class,
308+
(r) -> new Saml2AuthenticationException(new Saml2Error("code", "descirption"), "message",
309+
new IOException("fail")));
310+
generatorByClassName.put(Saml2Exception.class, (r) -> new Saml2Exception("message", new IOException("fail")));
304311
generatorByClassName.put(DefaultSaml2AuthenticatedPrincipal.class,
305312
(r) -> TestSaml2Authentications.authentication().getPrincipal());
306313
generatorByClassName.put(Saml2Authentication.class,

saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/Saml2Exception.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 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.saml2;
1818

19+
import java.io.Serial;
20+
1921
/**
2022
* @since 5.2
2123
*/
2224
public class Saml2Exception extends RuntimeException {
2325

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

saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/Saml2AuthenticationException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 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.saml2.provider.service.authentication;
1818

19+
import java.io.Serial;
20+
1921
import org.springframework.security.core.Authentication;
2022
import org.springframework.security.core.AuthenticationException;
2123
import org.springframework.security.saml2.core.Saml2Error;
@@ -40,6 +42,9 @@
4042
*/
4143
public class Saml2AuthenticationException extends AuthenticationException {
4244

45+
@Serial
46+
private static final long serialVersionUID = -2996886630890949105L;
47+
4348
private final Saml2Error error;
4449

4550
/**

0 commit comments

Comments
 (0)