Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.captcha
Class CaptchaEntryPoint

    java.lang.Object
      org.acegisecurity.captcha.CaptchaEntryPoint

All Implemented Interfaces:
  ChannelEntryPoint, InitializingBean

    public class CaptchaEntryPoint

extends Object
implements ChannelEntryPoint, InitializingBean

The captcha entry point : redirect to the captcha test page.

This entry point can force the use of SSL : see `getForceHttps()`

This entry point allows internal OR external redirect : see `setOutsideWebApp(boolean)`
/ Original request can be added to the redirect path using a custom translation : see `setIncludeOriginalRequest(boolean)`
Original request is translated using URLEncoding and the following translation mapping in the redirect url :

- original url => `getOriginalRequestUrlParameterName()`
- If `isIncludeOriginalParameters()`
- original method => `getOriginalRequestMethodParameterName()`
- original parameters => `getOriginalRequestParametersParameterName()`
- The original parameters string is contructed using :
  - a parameter separator `getOriginalRequestParametersSeparator()`
  - a parameter name value pair separator for each parameter `getOriginalRequestParametersNameValueSeparator()`

Default values :
forceHttps = false
includesOriginalRequest = true
includesOriginalParameters = false
isOutsideWebApp=false
originalRequestUrlParameterName =original_requestUrl
originalRequestParametersParameterName = original_request_parameters
originalRequestParametersNameValueSeparator = __
originalRequestParametersSeparator = ;;
originalRequestMethodParameterName = original_request_method
urlEncodingCharset = UTF-8

Version:
  $Id: CaptchaEntryPoint.java,v 1.4 2005/11/17 00:55:49 benalex Exp $
Author:
  marc antoine Garrigue

Constructor Summary
`CaptchaEntryPoint()`

Method Summary
`void` | `afterPropertiesSet()`
`void` | `commence(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)` Commences a secure channel.
`String` | `getCaptchaFormUrl()` DOCUMENT ME!
`boolean` | `getForceHttps()`
`String` | `getOriginalRequestMethodParameterName()`
`String` | `getOriginalRequestParametersNameValueSeparator()`
`String` | `getOriginalRequestParametersParameterName()`
`String` | `getOriginalRequestParametersSeparator()`
`String` | `getOriginalRequestUrlParameterName()`
`PortMapper` | `getPortMapper()`
`PortResolver` | `getPortResolver()`
`String` | `getUrlEncodingCharset()`
`boolean` | `isIncludeOriginalParameters()`
`boolean` | `isIncludeOriginalRequest()`
`boolean` | `isOutsideWebApp()`
`void` | `setCaptchaFormUrl(String captchaFormUrl)` The URL where the `CaptchaProcessingFilter` login page can be found.
`void` | `setForceHttps(boolean forceHttps)` Set to true to force captcha form access to be via https.
`void` | `setIncludeOriginalParameters(boolean includeOriginalParameters)`
`void` | `setIncludeOriginalRequest(boolean includeOriginalRequest)` If set to true, the original request url will be appended to the redirect url using the `getOriginalRequestUrlParameterName()`.
`void` | `setOriginalRequestMethodParameterName(String originalRequestMethodParameterName)`
`void` | `setOriginalRequestParametersNameValueSeparator(String originalRequestParametersNameValueSeparator)`
`void` | `setOriginalRequestParametersParameterName(String originalRequestParametersParameterName)`
`void` | `setOriginalRequestParametersSeparator(String originalRequestParametersSeparator)`
`void` | `setOriginalRequestUrlParameterName(String originalRequestUrlParameterName)`
`void` | `setOutsideWebApp(boolean isOutsideWebApp)` if set to true, the `commence(ServletRequest, ServletResponse)` method uses the `getCaptchaFormUrl()` as a complete URL, else it as a 'inside WebApp' path.
`void` | `setPortMapper(PortMapper portMapper)`
`void` | `setPortResolver(PortResolver portResolver)`
`void` | `setUrlEncodingCharset(String urlEncodingCharset)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CaptchaEntryPoint

    public CaptchaEntryPoint()

Method Detail

### setCaptchaFormUrl

    public void setCaptchaFormUrl(String captchaFormUrl)

  The URL where the `CaptchaProcessingFilter` login page can be found. Should be relative to the web-app context path, and include a leading `/`

  Parameters:
    `captchaFormUrl` -

### getCaptchaFormUrl

    public String getCaptchaFormUrl()

  DOCUMENT ME!

  Returns:
    the captcha test page to redirect to.

### setForceHttps

    public void setForceHttps(boolean forceHttps)

  Set to true to force captcha form access to be via https. If this value is ture (the default is false), and the incoming request for the protected resource which triggered the interceptor was not already `https`, then

  Parameters:
    `forceHttps` -

### getForceHttps

    public boolean getForceHttps()

### setIncludeOriginalParameters

    public void setIncludeOriginalParameters(boolean includeOriginalParameters)

### isIncludeOriginalParameters

    public boolean isIncludeOriginalParameters()

### setIncludeOriginalRequest

    public void setIncludeOriginalRequest(boolean includeOriginalRequest)

  If set to true, the original request url will be appended to the redirect url using the `getOriginalRequestUrlParameterName()`.

  Parameters:
    `includeOriginalRequest` -

### isIncludeOriginalRequest

    public boolean isIncludeOriginalRequest()

### setOriginalRequestMethodParameterName

    public void setOriginalRequestMethodParameterName(String originalRequestMethodParameterName)

### getOriginalRequestMethodParameterName

    public String getOriginalRequestMethodParameterName()

### setOriginalRequestParametersNameValueSeparator

    public void setOriginalRequestParametersNameValueSeparator(String originalRequestParametersNameValueSeparator)

### getOriginalRequestParametersNameValueSeparator

    public String getOriginalRequestParametersNameValueSeparator()

### setOriginalRequestParametersParameterName

    public void setOriginalRequestParametersParameterName(String originalRequestParametersParameterName)

### getOriginalRequestParametersParameterName

    public String getOriginalRequestParametersParameterName()

### setOriginalRequestParametersSeparator

    public void setOriginalRequestParametersSeparator(String originalRequestParametersSeparator)

### getOriginalRequestParametersSeparator

    public String getOriginalRequestParametersSeparator()

### setOriginalRequestUrlParameterName

    public void setOriginalRequestUrlParameterName(String originalRequestUrlParameterName)

### getOriginalRequestUrlParameterName

    public String getOriginalRequestUrlParameterName()

### setOutsideWebApp

    public void setOutsideWebApp(boolean isOutsideWebApp)

  if set to true, the `commence(ServletRequest, ServletResponse)` method uses the `getCaptchaFormUrl()` as a complete URL, else it as a 'inside WebApp' path.

  Parameters:
    `isOutsideWebApp` -

### isOutsideWebApp

    public boolean isOutsideWebApp()

### setPortMapper

    public void setPortMapper(PortMapper portMapper)

### getPortMapper

    public PortMapper getPortMapper()

### setPortResolver

    public void setPortResolver(PortResolver portResolver)

### getPortResolver

    public PortResolver getPortResolver()

### setUrlEncodingCharset

    public void setUrlEncodingCharset(String urlEncodingCharset)

### getUrlEncodingCharset

    public String getUrlEncodingCharset()

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`
  Throws:
    `Exception`

### commence

    public void commence(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response)
                  throws IOException,
                         javax.servlet.ServletException

  Description copied from interface: `ChannelEntryPoint`
  Commences a secure channel.

  Implementations should modify the headers on the `ServletResponse` as necessary to commence the user agent using the implementation's supported channel type.

  Specified by:
    `commence` in interface `ChannelEntryPoint`
  Parameters:
    `request` - that a `ChannelProcessor` has rejected
    `response` - so that the user agent can begin using a new channel
  Throws:
    `IOException`
    `javax.servlet.ServletException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.