|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint
public class DelegatingAuthenticationEntryPoint
An AuthenticationEntryPoint which selects a concrete EntryPoint based on a RequestMatcher evaluation.
A configuration might look like this:
<bean id="daep" class="org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint"> <constructor-arg> <map> <entry key="hasIpAddress('192.168.1.0/24') and hasHeader('User-Agent','Mozilla')" value-ref="firstAEP" /> <entry key="hasHeader('User-Agent','MSIE')" value-ref="secondAEP" /> </map> </constructor-arg> <property name="defaultEntryPoint" ref="defaultAEP"/> </bean>This example uses the
RequestMatcherEditor
which creates ELRequestMatcher
instances for the map keys.
Constructor Summary | |
---|---|
DelegatingAuthenticationEntryPoint(java.util.LinkedHashMap<RequestMatcher,AuthenticationEntryPoint> entryPoints)
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthenticationException authException)
Commences an authentication scheme. |
void |
setDefaultEntryPoint(AuthenticationEntryPoint defaultEntryPoint)
EntryPoint which is used when no RequestMatcher returned true |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingAuthenticationEntryPoint(java.util.LinkedHashMap<RequestMatcher,AuthenticationEntryPoint> entryPoints)
Method Detail |
---|
public void setDefaultEntryPoint(AuthenticationEntryPoint defaultEntryPoint)
public void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException authException) throws java.io.IOException, javax.servlet.ServletException
AuthenticationEntryPoint
ExceptionTranslationFilter
will populate the HttpSession
attribute named
AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_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.
commence
in interface AuthenticationEntryPoint
request
- that resulted in an AuthenticationException
response
- so that the user agent can begin authenticationauthException
- that caused the invocation
java.io.IOException
javax.servlet.ServletException
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |