|
|||||||||
| 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 List<String> |
skipNtlmAuthUrls
|
| Constructor Summary | |
|---|---|
NtlmAuthenticationProcessingFilter(org.acegisecurity.ldap.InitialDirContextFactory initialDirContextFactory)
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
org.acegisecurity.Authentication |
attemptAuthentication(ServletRequest request,
ServletResponse response,
FilterChain chain)
This method simply calls negotiate( req, resp, false ) and then chain.doFilter. |
void |
destroy()
Does nothing. |
protected String |
determineTargetUrl(HttpServletRequest request)
|
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
|
org.acegisecurity.ui.AuthenticationDetailsSource |
getAuthenticationDetailsSource()
|
String |
getDefaultDomain()
|
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. |
String |
getDomainController()
|
Properties |
getExceptionMappings()
|
org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator |
getLdapAuthoritiesPopulator()
|
Properties |
getProperties()
|
String |
getRealm()
|
org.acegisecurity.ui.rememberme.RememberMeServices |
getRememberMeServices()
|
List<String> |
getSkipNtlmAuthUrls()
|
void |
init(FilterConfig arg0)
Does JCIFS Initialization. |
boolean |
isAlwaysUseDefaultTargetUrl()
|
boolean |
isEnableBasic()
|
boolean |
isInsecureBasic()
|
boolean |
isLoadBalance()
|
protected jcifs.smb.NtlmPasswordAuthentication |
negotiate(HttpServletRequest req,
HttpServletResponse resp,
boolean skipAuthentication)
Negotiate password hashes with MSIE clients using NTLM SSP |
protected void |
onPreAuthentication(HttpServletRequest request,
HttpServletResponse response)
|
protected void |
onSuccessfulAuthentication(HttpServletRequest request,
HttpServletResponse response,
org.acegisecurity.Authentication authResult)
|
protected void |
onUnsuccessfulAuthentication(HttpServletRequest request,
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(String defaultDomain)
|
void |
setDefaultTargetUrl(String defaultTargetUrl)
|
protected void |
setDetails(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(String domainController)
|
void |
setEnableBasic(boolean enableBasic)
|
void |
setExceptionMappings(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(Properties properties)
|
void |
setRealm(String realm)
|
void |
setRememberMeServices(org.acegisecurity.ui.rememberme.RememberMeServices rememberMeServices)
|
void |
setSkipNtlmAuthUrls(List<String> skipNtlmAuthUrls)
|
protected void |
successfulAuthentication(HttpServletRequest request,
HttpServletResponse response,
org.acegisecurity.Authentication authResult)
|
protected void |
unsuccessfulAuthentication(HttpServletRequest request,
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 List<String> skipNtlmAuthUrls
| Constructor Detail |
|---|
public NtlmAuthenticationProcessingFilter(org.acegisecurity.ldap.InitialDirContextFactory initialDirContextFactory)
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.acegisecurity.providers.ldap.authenticator.AbstractLdapAuthenticatorExceptionpublic void destroy()
destroy in interface Filter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException
doFilter in interface FilterIOException
ServletExceptionpublic String getDefaultTargetUrl()
public Properties getExceptionMappings()
public org.acegisecurity.ui.rememberme.RememberMeServices getRememberMeServices()
public void init(FilterConfig arg0)
throws ServletException
init in interface Filterarg0 - ignored
ServletException - ignored
public org.acegisecurity.Authentication attemptAuthentication(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException,
org.acegisecurity.AuthenticationException
IOException
ServletException
org.acegisecurity.AuthenticationException
protected jcifs.smb.NtlmPasswordAuthentication negotiate(HttpServletRequest req,
HttpServletResponse resp,
boolean skipAuthentication)
throws IOException,
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).
IOException
ServletExceptionpublic String getDefaultDomain()
public void setDefaultDomain(String defaultDomain)
public String getDomainController()
public void setDomainController(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 String getRealm()
public void setRealm(String realm)
public Properties getProperties()
public void setProperties(Properties properties)
public boolean isAlwaysUseDefaultTargetUrl()
protected void onPreAuthentication(HttpServletRequest request,
HttpServletResponse response)
throws org.acegisecurity.AuthenticationException,
IOException
org.acegisecurity.AuthenticationException
IOException
protected void onSuccessfulAuthentication(HttpServletRequest request,
HttpServletResponse response,
org.acegisecurity.Authentication authResult)
throws IOException
IOException
protected void onUnsuccessfulAuthentication(HttpServletRequest request,
HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
throws IOException
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(String defaultTargetUrl)
public void setExceptionMappings(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(HttpServletRequest request,
HttpServletResponse response,
org.acegisecurity.Authentication authResult)
throws IOException
IOExceptionprotected String determineTargetUrl(HttpServletRequest request)
protected void unsuccessfulAuthentication(HttpServletRequest request,
HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
throws IOException
IOExceptionpublic org.acegisecurity.ui.AuthenticationDetailsSource getAuthenticationDetailsSource()
protected void setDetails(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 List<String> getSkipNtlmAuthUrls()
public void setSkipNtlmAuthUrls(List<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 | ||||||||