1 17 18 19 20 package org.apache.lenya.cms.cocoon.acting; 21 22 import java.util.Collections ; 23 import java.util.Map ; 24 25 import org.apache.avalon.framework.parameters.Parameters; 26 import org.apache.cocoon.environment.ObjectModelHelper; 27 import org.apache.cocoon.environment.Redirector; 28 import org.apache.cocoon.environment.Request; 29 import org.apache.cocoon.environment.SourceResolver; 30 31 34 public class DelegatingAuthenticatorAction extends AccessControlAction { 35 36 39 protected Map doAct( 40 Redirector redirector, 41 SourceResolver resolver, 42 Map objectModel, 43 String source, 44 Parameters parameters) 45 throws Exception { 46 47 getLogger().debug("Authenticating request"); 48 49 Request request = ObjectModelHelper.getRequest(objectModel); 50 Map result = null; 51 if (getAccessController().authenticate(request)) { 52 getLogger().debug("Authentication successful."); 53 result = Collections.EMPTY_MAP; 54 } 55 else { 56 getLogger().debug("Authentication failed."); 57 } 58 return result; 59 } 60 61 } 62 | Popular Tags |