1 17 18 19 package org.apache.catalina; 20 21 import java.beans.PropertyChangeListener ; 22 import java.io.IOException ; 23 import java.security.Principal ; 24 import java.security.cert.X509Certificate ; 25 26 import org.apache.catalina.connector.Request; 27 import org.apache.catalina.connector.Response; 28 import org.apache.catalina.deploy.SecurityConstraint; 29 39 40 public interface Realm { 41 42 43 45 46 49 public Container getContainer(); 50 51 52 57 public void setContainer(Container container); 58 59 60 65 public String getInfo(); 66 67 68 70 71 76 public void addPropertyChangeListener(PropertyChangeListener listener); 77 78 79 87 public Principal authenticate(String username, String credentials); 88 89 90 98 public Principal authenticate(String username, byte[] credentials); 99 100 101 114 public Principal authenticate(String username, String digest, 115 String nonce, String nc, String cnonce, 116 String qop, String realm, 117 String md5a2); 118 119 120 127 public Principal authenticate(X509Certificate certs[]); 128 129 130 135 public void backgroundProcess(); 136 137 138 144 public SecurityConstraint [] findSecurityConstraints(Request request, 145 Context context); 146 147 148 160 public boolean hasResourcePermission(Request request, 161 Response response, 162 SecurityConstraint [] constraint, 163 Context context) 164 throws IOException ; 165 166 167 175 public boolean hasRole(Principal principal, String role); 176 177 189 public boolean hasUserDataPermission(Request request, 190 Response response, 191 SecurityConstraint []constraint) 192 throws IOException ; 193 194 199 public void removePropertyChangeListener(PropertyChangeListener listener); 200 201 202 } 203 | Popular Tags |