org.apache.commons.jelly.tags.jetty
Class SecurityHandlerTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.jetty.SecurityHandlerTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class SecurityHandlerTag
extends org.apache.commons.jelly.TagSupport

Declare a security handler for a Jetty http server

Version:
$Id: SecurityHandlerTag.java,v 1.3 2002/07/14 12:38:22 dion Exp $
Author:
rtl

Field Summary
private  java.lang.String _authenticationMethod
          parameter authentication method, defaults to BASIC in Jetty
private  org.mortbay.jetty.servlet.FormAuthenticator _formAuthenticator
          a form authenticator used by this tag
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
SecurityHandlerTag()
          Creates a new instance of SecurityHandlerTag
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
          Perform the tag functionality.
 java.lang.String getauthenticationMethod()
          Getter for property authenticationMethod.
protected  void initLoginConfig(org.mortbay.xml.XmlParser.Node node, HttpContextTag httpContext)
           
protected  void initSecurityConstraint(org.mortbay.xml.XmlParser.Node node, HttpContextTag httpContext)
           
 void setauthenticationMethod(java.lang.String authenticationMethod)
          Setter for property authenticationMethod.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_formAuthenticator

private transient org.mortbay.jetty.servlet.FormAuthenticator _formAuthenticator
a form authenticator used by this tag


_authenticationMethod

private java.lang.String _authenticationMethod
parameter authentication method, defaults to BASIC in Jetty

Constructor Detail

SecurityHandlerTag

public SecurityHandlerTag()
Creates a new instance of SecurityHandlerTag

Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
           throws org.apache.commons.jelly.JellyTagException
Perform the tag functionality. In this case, add a security handler to the parent context, setting the authentication method if required The security constraints should be specified as the body of this tag using the same format as a web.xml file wrapped in a single tag to allow parsing of a well-formed snippet, e.g. Default / /docRoot/resourceHandlerTest/* GET HEAD * BASIC Jetty Demo Realm

Parameters:
xmlOutput - where to send output
Throws:
java.lang.Exception - when an error occurs
org.apache.commons.jelly.JellyTagException

initSecurityConstraint

protected void initSecurityConstraint(org.mortbay.xml.XmlParser.Node node,
                                      HttpContextTag httpContext)

initLoginConfig

protected void initLoginConfig(org.mortbay.xml.XmlParser.Node node,
                               HttpContextTag httpContext)

getauthenticationMethod

public java.lang.String getauthenticationMethod()
Getter for property authenticationMethod.

Returns:
value of property authenticationMethod.

setauthenticationMethod

public void setauthenticationMethod(java.lang.String authenticationMethod)
Setter for property authenticationMethod.

Parameters:
authenticationMethod - Type of authentication (BASIC, FORM, DIGEST, CLIENT-CERT) Note that only BASIC and CLIENT-CERT are supported by Jetty as of v4.1.1