01: // AclPrincipal.java
02: // $Id: AclPrincipal.java,v 1.5 2000/08/16 21:37:33 ylafon Exp $
03: // (c) COPYRIGHT MIT, INRIA and Keio, 1999.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.jigsaw.acl;
07:
08: import java.security.Principal;
09: import java.net.InetAddress;
10:
11: /**
12: * @version $Revision: 1.5 $
13: * @author Benoît Mahé (bmahe@w3.org)
14: */
15: public interface AclPrincipal extends Principal {
16:
17: /**
18: * Get the realm associated to this principal.(could be his group)
19: * @return the realm name.
20: */
21: public String getRealm();
22:
23: /**
24: * Get the password associated to this principal.
25: * @return the password
26: */
27: public String getPassword();
28:
29: /**
30: * Set a parameter.
31: * @param name the parameter name
32: * @param value the parameter value
33: */
34: public void setValue(String name, Object value);
35:
36: /**
37: * Get a parameter value.
38: * @param name the parameter name.
39: * @return the parameter value
40: */
41: public Object getValue(String name);
42:
43: /**
44: * Return true if the IPadress associated to this principal match
45: * the given one.
46: * @param adr an IP adress
47: * @return true if the ip adress match.
48: */
49: public boolean matchIP(InetAddress adr);
50:
51: }
|