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 javax.naming.directory.Attributes;
/**
* Captures the information for a user's LDAP entry.
*
@ -29,15 +26,6 @@ import javax.naming.directory.Attributes;
public interface LdapUserDetails extends UserDetails {
//~ 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.
*

View File

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