Add serialVersionUID to Authentication classes
Issue gh-16276
This commit is contained in:
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -34,6 +35,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public final class DefaultOAuth2AuthenticatedPrincipal implements OAuth2AuthenticatedPrincipal, Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 4631662622577433065L;
|
||||
|
||||
private final Map<String, Object> attributes;
|
||||
|
||||
private final Collection<GrantedAuthority> authorities;
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
@@ -41,6 +42,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class OAuth2AccessToken extends AbstractOAuth2Token {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3041884478533441940L;
|
||||
|
||||
private final TokenType tokenType;
|
||||
|
||||
private final Set<String> scopes;
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,9 @@ import java.time.Instant;
|
||||
*/
|
||||
public class OAuth2DeviceCode extends AbstractOAuth2Token {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -864134962034523562L;
|
||||
|
||||
/**
|
||||
* Constructs an {@code OAuth2DeviceCode} using the provided parameters.
|
||||
* @param tokenValue the token value
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
@@ -36,6 +37,9 @@ import java.time.Instant;
|
||||
*/
|
||||
public class OAuth2RefreshToken extends AbstractOAuth2Token {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4114856398229602435L;
|
||||
|
||||
/**
|
||||
* Constructs an {@code OAuth2RefreshToken} using the provided parameters.
|
||||
* @param tokenValue the token value
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,9 @@ import java.time.Instant;
|
||||
*/
|
||||
public class OAuth2UserCode extends AbstractOAuth2Token {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3948612521903348476L;
|
||||
|
||||
/**
|
||||
* Constructs an {@code OAuth2UserCode} using the provided parameters.
|
||||
* @param tokenValue the token value
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core.oidc;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.Instant;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -48,6 +49,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class OidcIdToken extends AbstractOAuth2Token implements IdTokenClaimAccessor {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -1840734870428968020L;
|
||||
|
||||
private final Map<String, Object> claims;
|
||||
|
||||
/**
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core.oidc.user;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -42,6 +43,9 @@ import org.springframework.security.oauth2.core.user.DefaultOAuth2User;
|
||||
*/
|
||||
public class DefaultOidcUser extends DefaultOAuth2User implements OidcUser {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2378469202439157250L;
|
||||
|
||||
private final OidcIdToken idToken;
|
||||
|
||||
private final OidcUserInfo userInfo;
|
||||
|
||||
+4
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.security.oauth2.core.oidc.user;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -36,6 +37,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class OidcUserAuthority extends OAuth2UserAuthority {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -4675866280835753141L;
|
||||
|
||||
private final OidcIdToken idToken;
|
||||
|
||||
private final OidcUserInfo userInfo;
|
||||
|
||||
Reference in New Issue
Block a user