SEC-991: Removed deprecated getAttributes() method from LdapUserDetails interface

This commit is contained in:
Luke Taylor 2008-10-17 05:12:11 +00:00
parent b589f78918
commit b031124f61
2 changed files with 1 additions and 23 deletions

View File

@ -17,9 +17,6 @@ package org.springframework.security.userdetails.ldap;
import org.springframework.security.userdetails.UserDetails; import org.springframework.security.userdetails.UserDetails;
import javax.naming.directory.Attributes;
/** /**
* Captures the information for a user's LDAP entry. * Captures the information for a user's LDAP entry.
* *
@ -29,15 +26,6 @@ import javax.naming.directory.Attributes;
public interface LdapUserDetails extends UserDetails { public interface LdapUserDetails extends UserDetails {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
/**
* The attributes for the user's entry in the directory (or a subset of them, depending on what was
* retrieved from the directory).
*
* @deprecated Map additional attributes to user properties in a custom object rather than accessing them here.
* @return the user's attributes, or an empty array if none were obtained, never null.
*/
Attributes getAttributes();
/** /**
* The DN of the entry for this user's account. * The DN of the entry for this user's account.
* *

View File

@ -47,7 +47,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
private Attributes attributes = new BasicAttributes();
private String dn; private String dn;
private String password; private String password;
private String username; private String username;
@ -63,10 +62,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails {
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
public Attributes getAttributes() {
return attributes;
}
public GrantedAuthority[] getAuthorities() { public GrantedAuthority[] getAuthorities() {
return authorities; return authorities;
} }
@ -143,7 +138,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails {
public Essence(LdapUserDetails copyMe) { public Essence(LdapUserDetails copyMe) {
setDn(copyMe.getDn()); setDn(copyMe.getDn());
setAttributes(copyMe.getAttributes());
setUsername(copyMe.getUsername()); setUsername(copyMe.getUsername());
setPassword(copyMe.getPassword()); setPassword(copyMe.getPassword());
setEnabled(copyMe.isEnabled()); setEnabled(copyMe.isEnabled());
@ -202,10 +196,6 @@ public class LdapUserDetailsImpl implements LdapUserDetails {
instance.accountNonLocked = accountNonLocked; instance.accountNonLocked = accountNonLocked;
} }
public void setAttributes(Attributes attributes) {
instance.attributes = attributes;
}
public void setAuthorities(GrantedAuthority[] authorities) { public void setAuthorities(GrantedAuthority[] authorities) {
mutableAuthorities = new ArrayList(Arrays.asList(authorities)); mutableAuthorities = new ArrayList(Arrays.asList(authorities));
} }