1 18 package sync4j.framework.security; 19 20 import java.security.Principal ; 21 22 import sync4j.framework.security.Officer; 23 import sync4j.framework.core.Cred; 24 25 32 public class SimpleOfficer implements Officer { 33 34 41 public boolean authenticate(Cred credential) { 42 return true; 43 } 44 45 54 public boolean authorize(Principal principal, String resource) { 55 return true; 56 } 57 58 62 public void unAuthenticate(Cred credential) { 63 } 64 65 68 public boolean isAccountExpired() { 69 return false; 70 } 71 72 74 77 private String clientAuth = Cred.AUTH_TYPE_BASIC; 78 public String getClientAuth() { 79 return this.clientAuth; 80 } 81 82 public void setClientAuth(String clientAuth) { 83 this.clientAuth = clientAuth; 84 } 85 86 89 private String serverAuth = Cred.AUTH_NONE; 90 public String getServerAuth() { 91 return this.serverAuth; 92 } 93 94 public void setServerAuth(String serverAuth) { 95 this.serverAuth = serverAuth; 96 } 97 } | Popular Tags |