Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.ui.basicauth
Class BasicProcessingFilterEntryPoint  view BasicProcessingFilterEntryPoint download BasicProcessingFilterEntryPoint.java

java.lang.Object
  extended byorg.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint
All Implemented Interfaces:
org.acegisecurity.intercept.web.AuthenticationEntryPoint, org.springframework.beans.factory.InitializingBean

public class BasicProcessingFilterEntryPoint
extends java.lang.Object
implements org.acegisecurity.intercept.web.AuthenticationEntryPoint, org.springframework.beans.factory.InitializingBean

Used by the SecurityEnforcementFilter to commence authentication via the BasicProcessingFilter.

Once a user agent is authenticated using BASIC authentication, logout requires that the browser be closed or an unauthorized (401) header be sent. The simplest way of achieving the latter is to call the #commence(ServletRequest, ServletResponse) method below. This will indicate to the browser its credentials are no longer authorized, causing it to prompt the user to login again.

Version:
$Id: BasicProcessingFilterEntryPoint.java,v 1.4 2005/11/17 00:56:48 benalex Exp $

Field Summary
private  java.lang.String realmName
           
 
Constructor Summary
BasicProcessingFilterEntryPoint()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 void commence(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.acegisecurity.AuthenticationException authException)
          Commences an authentication scheme.
 java.lang.String getRealmName()
           
 void setRealmName(java.lang.String realmName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

realmName

private java.lang.String realmName
Constructor Detail

BasicProcessingFilterEntryPoint

public BasicProcessingFilterEntryPoint()
Method Detail

setRealmName

public void setRealmName(java.lang.String realmName)

getRealmName

public java.lang.String getRealmName()

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Description copied from interface: org.springframework.beans.factory.InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

commence

public void commence(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     org.acegisecurity.AuthenticationException authException)
              throws java.io.IOException,
                     javax.servlet.ServletException
Description copied from interface: org.acegisecurity.intercept.web.AuthenticationEntryPoint
Commences an authentication scheme.

SecurityEnforcementFilter will populate the HttpSession attribute named AuthenticationProcessingFilter.ACEGI_SECURITY_TARGET_URL_KEY with the requested target URL before calling this method.

Implementations should modify the headers on the ServletResponse as necessary to commence the authentication process.

Specified by:
commence in interface org.acegisecurity.intercept.web.AuthenticationEntryPoint