1 package compbio.spring.security;
3 import org.springframework.security.core.GrantedAuthority;
4 import org.springframework.util.Assert;
7 * The class implements the standard granted authority for Spring Security Not
8 * used in the current version of ProteoCache
10 * @version 1.0 January 2014
12 * @author Alexaner Sherstnev
15 public final class PCacheLDAPAuthority implements GrantedAuthority {
17 private static final long serialVersionUID = 1;
19 private String role = "ROLE_LDAP_USER";
21 public PCacheLDAPAuthority(String role) {
22 Assert.hasText(role, "A text representation of the granted authority is required");
26 public String getAuthority() {
30 public boolean equals(Object obj) {
34 if (obj instanceof PCacheLDAPAuthority) {
35 return role.equals(((PCacheLDAPAuthority) obj).role);
40 public int hashCode() {
41 return this.role.hashCode();
44 public String toString() {