| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.ac.impl.PolicyAuthorizer
public class PolicyAuthorizer
Policy-based authorizer.
| Field Summary | 
|---|
| Fields inherited from interface org.apache.lenya.ac.Authorizer | 
|---|
ROLE | 
| Constructor Summary | |
|---|---|
PolicyAuthorizer()
Creates a new policy authorizer.  | 
|
| Method Summary | |
|---|---|
 boolean | 
authorize(org.apache.cocoon.environment.Request request)
Authorizes an identity at a URL.  | 
protected  boolean | 
authorizePolicy(Identity identity,
                org.apache.cocoon.environment.Request request)
Authorizes an request for an identity depending on a policy.  | 
 AccreditableManager | 
getAccreditableManager()
Returns the accreditable manager.  | 
 PolicyManager | 
getPolicyManager()
Returns the policy manager.  | 
static Role[] | 
getRoles(org.apache.cocoon.environment.Request request)
Fetches the stored roles from the request.  | 
protected  void | 
saveRoles(org.apache.cocoon.environment.Request request,
          Role[] roles)
Saves the roles of the current identity to the request.  | 
 void | 
setAccreditableManager(AccreditableManager manager)
Sets the accreditable manager.  | 
 void | 
setPolicyManager(PolicyManager manager)
Sets the policy manager.  | 
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled | 
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public PolicyAuthorizer()
| Method Detail | 
|---|
public AccreditableManager getAccreditableManager()
public PolicyManager getPolicyManager()
public void setPolicyManager(PolicyManager manager)
manager - A policy manager.public void setAccreditableManager(AccreditableManager manager)
manager - An accreditable manager.
public boolean authorize(org.apache.cocoon.environment.Request request)
                  throws AccessControlException
Authorizer
authorize in interface Authorizerrequest - The request.
true if the identity is authorized, false otherwise.
AccessControlException - when something went wrong.Authorizer.authorize(org.apache.cocoon.environment.Request)
protected boolean authorizePolicy(Identity identity,
                                  org.apache.cocoon.environment.Request request)
                           throws AccessControlException
identity - The identity to authorize.request - The request to authorize.
AccessControlException - when something went wrong.
protected void saveRoles(org.apache.cocoon.environment.Request request,
                         Role[] roles)
request - The request.roles - The roles.
public static Role[] getRoles(org.apache.cocoon.environment.Request request)
                       throws AccessControlException
request - The request.
AccessControlException - If the request does not contain the roles list.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||