org.apache.cocoon.auth.impl
Class PipelineSecurityHandler

java.lang.Object
  extended byorg.apache.cocoon.auth.impl.AbstractSecurityHandler
      extended byorg.apache.cocoon.auth.impl.PipelineSecurityHandler
All Implemented Interfaces:
BeanNameAware, org.apache.cocoon.auth.SecurityHandler

public class PipelineSecurityHandler
extends AbstractSecurityHandler

Verify if a user can be authenticated.

Version:
$Id: PipelineSecurityHandler.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Nested Class Summary
static class PipelineSecurityHandler.PipelineSHUser
          The internal user class.
 
Field Summary
protected  String authenticationResource
          The authentication resource.
protected  String logoutResource
          The logout resource.
protected  SourceResolver resolver
          The source resolver.
 
Fields inherited from class org.apache.cocoon.auth.impl.AbstractSecurityHandler
anonName, anonPass, id, supportAnonUser
 
Constructor Summary
PipelineSecurityHandler()
           
 
Method Summary
protected  String isValidAuthenticationDocument(Document doc)
          Check if this is a valid document.
 org.apache.cocoon.auth.User login(Map loginContext)
           
 void logout(Map logoutContext, org.apache.cocoon.auth.User user)
           
 void setAuthenticationResource(String authenticationResource)
           
 void setLogoutResource(String logoutResource)
           
 void setSourceResolver(SourceResolver resolver)
           
 
Methods inherited from class org.apache.cocoon.auth.impl.AbstractSecurityHandler
getId, getLogger, setAnonymousName, setAnonymousPassword, setBeanName, setLogger, setSupportAnonymousUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected SourceResolver resolver
The source resolver.


authenticationResource

protected String authenticationResource
The authentication resource.


logoutResource

protected String logoutResource
The logout resource.

Constructor Detail

PipelineSecurityHandler

public PipelineSecurityHandler()
Method Detail

setAuthenticationResource

public void setAuthenticationResource(String authenticationResource)

setLogoutResource

public void setLogoutResource(String logoutResource)

setSourceResolver

public void setSourceResolver(SourceResolver resolver)

isValidAuthenticationDocument

protected String isValidAuthenticationDocument(Document doc)
Check if this is a valid document. A valid document has "authentication" as the root node and at least one child element "ID".

Parameters:
doc - The document read by the pipeline.
Returns:
The value of the ID element or null if the document is not valid

login

public org.apache.cocoon.auth.User login(Map loginContext)
                                  throws org.apache.cocoon.auth.AuthenticationException
Throws:
org.apache.cocoon.auth.AuthenticationException
See Also:
SecurityHandler.login(java.util.Map)

logout

public void logout(Map logoutContext,
                   org.apache.cocoon.auth.User user)
See Also:
SecurityHandler.logout(java.util.Map, org.apache.cocoon.auth.User)


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.