|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjif.lang.PrincipalUtil
public class PrincipalUtil
Utility methods for principals. See the Jif source code, in lib-src/jif/lang/PrincipalUtil.jif
| Constructor Summary | |
|---|---|
PrincipalUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
acts_for(Principal p,
Principal q)
Returns true if and only if the principal p acts for the principal q. |
static boolean |
actsFor(Principal p,
Principal q)
Returns true if and only if the principal p acts for the principal q. |
static Capability |
authorize(Principal p,
java.lang.Object authPrf,
Closure c,
Label lb)
Obtain a Capability for the given principal and closure. |
static boolean |
equivalentTo(Principal p,
Principal q)
|
static Principal[] |
findDelegatesChain(Principal p,
Principal q)
Search for a delegates-chain between p and q. |
static Principal |
nullPrincipal()
returns the null principal, the principal that every other principal can act for. |
static boolean |
verifyChain(Principal[] chain,
Principal p,
Principal q)
Verify that the chain is a valid delegates-chain between p and q. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrincipalUtil()
| Method Detail |
|---|
public static boolean acts_for(Principal p,
Principal q)
actsFor method.
public static boolean actsFor(Principal p,
Principal q)
public static Principal[] findDelegatesChain(Principal p,
Principal q)
a of length L such that
a[L-1] == q
a[L-1] delegates to a[L-2]
...
a[1] delegates to a[0]
a[0] == p
. Thus, a valid delegate chain between p and q implies that p acts
for q.
p - q -
public static boolean verifyChain(Principal[] chain,
Principal p,
Principal q)
public static boolean equivalentTo(Principal p,
Principal q)
public static Capability authorize(Principal p,
java.lang.Object authPrf,
Closure c,
Label lb)
public static Principal nullPrincipal()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||