Explorar o código

Remove "controls" property as it doesn't really make sense and has never been used.

Luke Taylor %!s(int64=18) %!d(string=hai) anos
pai
achega
1196381220

+ 0 - 7
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.
      *

+ 0 - 11
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;
         }