SEC-338: Serializable and serialVersionUID missing for Authentication-related objects.

This commit is contained in:
Ben Alex 2006-09-15 08:38:11 +00:00
parent 7313d5def0
commit b0056568f0
16 changed files with 18 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import org.mortbay.http.UserPrincipal;
public class JettyAcegiUserToken extends AbstractAdapterAuthenticationToken implements UserPrincipal { public class JettyAcegiUserToken extends AbstractAdapterAuthenticationToken implements UserPrincipal {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private String password; private String password;
private String username; private String username;

View File

@ -15,6 +15,8 @@
package org.acegisecurity; package org.acegisecurity;
import java.io.Serializable;
/** /**
* Represents an authority granted to an {@link Authentication} object. * Represents an authority granted to an {@link Authentication} object.
* *
@ -27,7 +29,7 @@ package org.acegisecurity;
* @author Ben Alex * @author Ben Alex
* @version $Id$ * @version $Id$
*/ */
public interface GrantedAuthority { public interface GrantedAuthority extends Serializable {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
/** /**

View File

@ -28,6 +28,7 @@ import java.io.Serializable;
public class GrantedAuthorityImpl implements GrantedAuthority, Serializable { public class GrantedAuthorityImpl implements GrantedAuthority, Serializable {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private String role; private String role;
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================

View File

@ -29,6 +29,7 @@ import java.security.Principal;
public class PrincipalAcegiUserToken extends AbstractAdapterAuthenticationToken implements Principal { public class PrincipalAcegiUserToken extends AbstractAdapterAuthenticationToken implements Principal {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Object principal; private Object principal;
private String password; private String password;
private String username; private String username;

View File

@ -28,6 +28,7 @@ import org.acegisecurity.GrantedAuthority;
public class TestingAuthenticationToken extends AbstractAuthenticationToken { public class TestingAuthenticationToken extends AbstractAuthenticationToken {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Object credentials; private Object credentials;
private Object principal; private Object principal;

View File

@ -30,6 +30,7 @@ import org.acegisecurity.GrantedAuthority;
public class UsernamePasswordAuthenticationToken extends AbstractAuthenticationToken { public class UsernamePasswordAuthenticationToken extends AbstractAuthenticationToken {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Object credentials; private Object credentials;
private Object principal; private Object principal;

View File

@ -31,6 +31,7 @@ import java.io.Serializable;
public class AnonymousAuthenticationToken extends AbstractAuthenticationToken implements Serializable { public class AnonymousAuthenticationToken extends AbstractAuthenticationToken implements Serializable {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Object principal; private Object principal;
private int keyHash; private int keyHash;

View File

@ -35,6 +35,7 @@ import java.util.List;
public class CasAuthenticationToken extends AbstractAuthenticationToken implements Serializable { public class CasAuthenticationToken extends AbstractAuthenticationToken implements Serializable {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private final List proxyList; private final List proxyList;
private final Object credentials; private final Object credentials;
private final Object principal; private final Object principal;

View File

@ -30,6 +30,7 @@ import javax.security.auth.login.LoginContext;
public class JaasAuthenticationToken extends UsernamePasswordAuthenticationToken { public class JaasAuthenticationToken extends UsernamePasswordAuthenticationToken {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private transient LoginContext loginContext = null; private transient LoginContext loginContext = null;
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================

View File

@ -32,6 +32,7 @@ import java.security.Principal;
public class JaasGrantedAuthority extends GrantedAuthorityImpl { public class JaasGrantedAuthority extends GrantedAuthorityImpl {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Principal principal; private Principal principal;
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================

View File

@ -31,6 +31,7 @@ import org.acegisecurity.providers.AbstractAuthenticationToken;
public class RememberMeAuthenticationToken extends AbstractAuthenticationToken implements Serializable { public class RememberMeAuthenticationToken extends AbstractAuthenticationToken implements Serializable {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Object principal; private Object principal;
private int keyHash; private int keyHash;

View File

@ -31,6 +31,7 @@ import java.security.cert.X509Certificate;
public class X509AuthenticationToken extends AbstractAuthenticationToken { public class X509AuthenticationToken extends AbstractAuthenticationToken {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Object principal; private Object principal;
private X509Certificate credentials; private X509Certificate credentials;

View File

@ -29,6 +29,7 @@ import org.acegisecurity.providers.AbstractAuthenticationToken;
public class RunAsUserToken extends AbstractAuthenticationToken { public class RunAsUserToken extends AbstractAuthenticationToken {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Class originalAuthentication; private Class originalAuthentication;
private Object credentials; private Object credentials;
private Object principal; private Object principal;

View File

@ -31,6 +31,7 @@ import org.acegisecurity.GrantedAuthorityImpl;
public class SwitchUserGrantedAuthority extends GrantedAuthorityImpl { public class SwitchUserGrantedAuthority extends GrantedAuthorityImpl {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private Authentication source; private Authentication source;
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================

View File

@ -31,6 +31,7 @@ import org.springframework.util.Assert;
public class User implements UserDetails { public class User implements UserDetails {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private static final long serialVersionUID = 1L;
private String password; private String password;
private String username; private String username;
private GrantedAuthority[] authorities; private GrantedAuthority[] authorities;

View File

@ -41,6 +41,7 @@ import javax.naming.ldap.Control;
public class LdapUserDetailsImpl implements LdapUserDetails { public class LdapUserDetailsImpl implements LdapUserDetails {
//~ Static fields/initializers ===================================================================================== //~ Static fields/initializers =====================================================================================
private static final long serialVersionUID = 1L;
private static final GrantedAuthority[] NO_AUTHORITIES = new GrantedAuthority[0]; private static final GrantedAuthority[] NO_AUTHORITIES = new GrantedAuthority[0];
private static final Control[] NO_CONTROLS = new Control[0]; private static final Control[] NO_CONTROLS = new Control[0];