From 1196381220ef9e9a893a50dae4417eff1af567e1 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Sat, 17 Nov 2007 20:55:39 +0000 Subject: [PATCH] Remove "controls" property as it doesn't really make sense and has never been used. --- .../security/userdetails/ldap/LdapUserDetails.java | 7 ------- .../userdetails/ldap/LdapUserDetailsImpl.java | 11 ----------- 2 files changed, 18 deletions(-) diff --git a/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetails.java b/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetails.java index b602a58ef7..5c3a80d1a7 100644 --- a/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetails.java +++ b/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetails.java @@ -39,13 +39,6 @@ public interface LdapUserDetails extends UserDetails { */ Attributes getAttributes(); - /** - * Returns any LDAP response controls (as part of a user authentication process, for example). - * - * @return an array of LDAP Control instances, never null - */ - Control[] getControls(); - /** * The DN of the entry for this user's account. * diff --git a/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetailsImpl.java b/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetailsImpl.java index e4bf9b9baf..d02416588c 100644 --- a/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetailsImpl.java +++ b/core/src/main/java/org/springframework/security/userdetails/ldap/LdapUserDetailsImpl.java @@ -48,7 +48,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails { //~ Static fields/initializers ===================================================================================== private static final GrantedAuthority[] NO_AUTHORITIES = new GrantedAuthority[0]; - private static final Control[] NO_CONTROLS = new Control[0]; //~ Instance fields ================================================================================================ @@ -57,7 +56,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails { private String password; private String username; private GrantedAuthority[] authorities = NO_AUTHORITIES; - private Control[] controls = NO_CONTROLS; private boolean accountNonExpired = true; private boolean accountNonLocked = true; private boolean credentialsNonExpired = true; @@ -77,10 +75,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails { return authorities; } - public Control[] getControls() { - return controls; - } - public String getDn() { return dn; } @@ -133,7 +127,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails { setAccountNonExpired(copyMe.isAccountNonExpired()); setCredentialsNonExpired(copyMe.isCredentialsNonExpired()); setAccountNonLocked(copyMe.isAccountNonLocked()); - setControls(copyMe.getControls()); setAuthorities(copyMe.getAuthorities()); } @@ -193,10 +186,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails { mutableAuthorities = new ArrayList(Arrays.asList(authorities)); } - public void setControls(Control[] controls) { - instance.controls = controls; - } - public void setCredentialsNonExpired(boolean credentialsNonExpired) { instance.credentialsNonExpired = credentialsNonExpired; }