|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.acegisecurity.providers.ldap.authenticator.AbstractLdapAuthenticator
org.acegisecurity.providers.ldap.authenticator.BindAuthenticator
org.opennms.web.acegisecurity.NtlmAuthenticationProcessingFilter
public class NtlmAuthenticationProcessingFilter
Processes an authentication form.
Login forms must present two parameters to this filter: a username and
password. The parameter names to use are contained in the static fields #ACEGI_SECURITY_FORM_USERNAME_KEY
and #ACEGI_SECURITY_FORM_PASSWORD_KEY.
Do not use this class directly. Instead configure web.xml to use the org.acegisecurity.util.FilterToBeanProxy.
| Field Summary | |
|---|---|
protected org.acegisecurity.ui.AuthenticationDetailsSource |
authenticationDetailsSource
|
protected org.springframework.context.ApplicationEventPublisher |
eventPublisher
|
protected org.springframework.context.support.MessageSourceAccessor |
messages
|
protected java.util.List<java.lang.String> |
skipNtlmAuthUrls
|
| Constructor Summary | |
|---|---|
NtlmAuthenticationProcessingFilter(org.acegisecurity.ldap.InitialDirContextFactory initialDirContextFactory)
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
org.acegisecurity.Authentication |
attemptAuthentication(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
This method simply calls negotiate( req, resp, false ) and then chain.doFilter. |
void |
destroy()
Does nothing. |
protected java.lang.String |
determineTargetUrl(javax.servlet.http.HttpServletRequest request)
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
|
org.acegisecurity.ui.AuthenticationDetailsSource |
getAuthenticationDetailsSource()
|
java.lang.String |
getDefaultDomain()
|
java.lang.String |
getDefaultTargetUrl()
Supplies the default target Url that will be used if no saved request is found or the alwaysUseDefaultTargetUrl propert is set to true. |
java.lang.String |
getDomainController()
|
java.util.Properties |
getExceptionMappings()
|
org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator |
getLdapAuthoritiesPopulator()
|
java.util.Properties |
getProperties()
|
java.lang.String |
getRealm()
|
org.acegisecurity.ui.rememberme.RememberMeServices |
getRememberMeServices()
|
java.util.List<java.lang.String> |
getSkipNtlmAuthUrls()
|
void |
init(javax.servlet.FilterConfig arg0)
Does JCIFS Initialization. |
boolean |
isAlwaysUseDefaultTargetUrl()
|
boolean |
isEnableBasic()
|
boolean |
isInsecureBasic()
|
boolean |
isLoadBalance()
|
protected jcifs.smb.NtlmPasswordAuthentication |
negotiate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
boolean skipAuthentication)
Negotiate password hashes with MSIE clients using NTLM SSP |
protected void |
onPreAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
onSuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.Authentication authResult)
|
protected void |
onUnsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
|
void |
setAlwaysUseDefaultTargetUrl(boolean alwaysUseDefaultTargetUrl)
|
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
|
void |
setAuthenticationDetailsSource(org.acegisecurity.ui.AuthenticationDetailsSource authenticationDetailsSource)
|
void |
setDefaultDomain(java.lang.String defaultDomain)
|
void |
setDefaultTargetUrl(java.lang.String defaultTargetUrl)
|
protected void |
setDetails(javax.servlet.http.HttpServletRequest request,
org.acegisecurity.providers.UsernamePasswordAuthenticationToken authRequest)
Provided so that subclasses may configure what is put into the authentication request's details property. |
void |
setDomainController(java.lang.String domainController)
|
void |
setEnableBasic(boolean enableBasic)
|
void |
setExceptionMappings(java.util.Properties exceptionMappings)
|
void |
setInsecureBasic(boolean insecureBasic)
|
void |
setLdapAuthoritiesPopulator(org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator ldapAuthoritiesPopulator)
|
void |
setLoadBalance(boolean loadBalance)
|
void |
setMessageSource(org.springframework.context.MessageSource messageSource)
|
void |
setProperties(java.util.Properties properties)
|
void |
setRealm(java.lang.String realm)
|
void |
setRememberMeServices(org.acegisecurity.ui.rememberme.RememberMeServices rememberMeServices)
|
void |
setSkipNtlmAuthUrls(java.util.List<java.lang.String> skipNtlmAuthUrls)
|
protected void |
successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.Authentication authResult)
|
protected void |
unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
|
| Methods inherited from class org.acegisecurity.providers.ldap.authenticator.BindAuthenticator |
|---|
authenticate |
| Methods inherited from class org.acegisecurity.providers.ldap.authenticator.AbstractLdapAuthenticator |
|---|
getInitialDirContextFactory, getUserAttributes, getUserDetailsMapper, getUserDns, getUserSearch, setUserAttributes, setUserDetailsMapper, setUserDnPatterns, setUserSearch |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.springframework.context.ApplicationEventPublisher eventPublisher
protected org.acegisecurity.ui.AuthenticationDetailsSource authenticationDetailsSource
protected org.springframework.context.support.MessageSourceAccessor messages
protected java.util.List<java.lang.String> skipNtlmAuthUrls
| Constructor Detail |
|---|
public NtlmAuthenticationProcessingFilter(org.acegisecurity.ldap.InitialDirContextFactory initialDirContextFactory)
| Method Detail |
|---|
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.acegisecurity.providers.ldap.authenticator.AbstractLdapAuthenticatorjava.lang.Exceptionpublic void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOException
javax.servlet.ServletExceptionpublic java.lang.String getDefaultTargetUrl()
public java.util.Properties getExceptionMappings()
public org.acegisecurity.ui.rememberme.RememberMeServices getRememberMeServices()
public void init(javax.servlet.FilterConfig arg0)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterarg0 - ignored
javax.servlet.ServletException - ignored
public org.acegisecurity.Authentication attemptAuthentication(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException,
org.acegisecurity.AuthenticationException
java.io.IOException
javax.servlet.ServletException
org.acegisecurity.AuthenticationException
protected jcifs.smb.NtlmPasswordAuthentication negotiate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
boolean skipAuthentication)
throws java.io.IOException,
javax.servlet.ServletException
req - The servlet requestresp - The servlet responseskipAuthentication - If true the negotiation is only done if it is
initiated by the client (MSIE post requests after successful NTLM SSP
authentication). If false and the user has not been authenticated yet
the client will be forced to send an authentication (server sends
HttpServletResponse.SC_UNAUTHORIZED).
java.io.IOException
javax.servlet.ServletExceptionpublic java.lang.String getDefaultDomain()
public void setDefaultDomain(java.lang.String defaultDomain)
public java.lang.String getDomainController()
public void setDomainController(java.lang.String domainController)
public boolean isLoadBalance()
public void setLoadBalance(boolean loadBalance)
public boolean isEnableBasic()
public void setEnableBasic(boolean enableBasic)
public boolean isInsecureBasic()
public void setInsecureBasic(boolean insecureBasic)
public java.lang.String getRealm()
public void setRealm(java.lang.String realm)
public java.util.Properties getProperties()
public void setProperties(java.util.Properties properties)
public boolean isAlwaysUseDefaultTargetUrl()
protected void onPreAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.acegisecurity.AuthenticationException,
java.io.IOException
org.acegisecurity.AuthenticationException
java.io.IOException
protected void onSuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.Authentication authResult)
throws java.io.IOException
java.io.IOException
protected void onUnsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
throws java.io.IOException
java.io.IOExceptionpublic void setAlwaysUseDefaultTargetUrl(boolean alwaysUseDefaultTargetUrl)
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic void setAuthenticationDetailsSource(org.acegisecurity.ui.AuthenticationDetailsSource authenticationDetailsSource)
public void setDefaultTargetUrl(java.lang.String defaultTargetUrl)
public void setExceptionMappings(java.util.Properties exceptionMappings)
public void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource in interface org.springframework.context.MessageSourceAwaresetMessageSource in class org.acegisecurity.providers.ldap.authenticator.AbstractLdapAuthenticatorpublic void setRememberMeServices(org.acegisecurity.ui.rememberme.RememberMeServices rememberMeServices)
protected void successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.Authentication authResult)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String determineTargetUrl(javax.servlet.http.HttpServletRequest request)
protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
throws java.io.IOException
java.io.IOExceptionpublic org.acegisecurity.ui.AuthenticationDetailsSource getAuthenticationDetailsSource()
protected void setDetails(javax.servlet.http.HttpServletRequest request,
org.acegisecurity.providers.UsernamePasswordAuthenticationToken authRequest)
request - that an authentication request is being created forauthRequest - the authentication request object that should have its details setpublic java.util.List<java.lang.String> getSkipNtlmAuthUrls()
public void setSkipNtlmAuthUrls(java.util.List<java.lang.String> skipNtlmAuthUrls)
public org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator getLdapAuthoritiesPopulator()
public void setLdapAuthoritiesPopulator(org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator ldapAuthoritiesPopulator)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||