Support Serialization in Exceptions

Issue gh-16276
This commit is contained in:
Josh Cummings
2025-01-14 18:25:17 -07:00
parent 8e59fa1719
commit 244fd2eb51
66 changed files with 249 additions and 2 deletions

View File

@@ -16,6 +16,8 @@
package org.springframework.security.oauth2.server.resource;
import java.io.Serial;
import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
/**
@@ -26,6 +28,9 @@ import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
*/
public class InvalidBearerTokenException extends OAuth2AuthenticationException {
@Serial
private static final long serialVersionUID = 6904689954809100280L;
/**
* Construct an instance of {@link InvalidBearerTokenException} given the provided
* description.

View File

@@ -16,6 +16,8 @@
package org.springframework.security.oauth2.server.resource.introspection;
import java.io.Serial;
/**
* An exception similar to
* {@link org.springframework.security.authentication.BadCredentialsException} that
@@ -26,6 +28,9 @@ package org.springframework.security.oauth2.server.resource.introspection;
*/
public class BadOpaqueTokenException extends OAuth2IntrospectionException {
@Serial
private static final long serialVersionUID = -6937847463454551076L;
public BadOpaqueTokenException(String message) {
super(message);
}

View File

@@ -16,6 +16,8 @@
package org.springframework.security.oauth2.server.resource.introspection;
import java.io.Serial;
/**
* Base exception for all OAuth 2.0 Introspection related errors
*
@@ -24,6 +26,9 @@ package org.springframework.security.oauth2.server.resource.introspection;
*/
public class OAuth2IntrospectionException extends RuntimeException {
@Serial
private static final long serialVersionUID = -7327790383594166793L;
public OAuth2IntrospectionException(String message) {
super(message);
}