views:

112

answers:

2

when ntlmprocessingfilter fail (entered wrong username and password), it is forwarded to form-login page. but i cannot get value from j_username in protected UserDetails retrieveUser(String username

any idea what i miss out?

i found out it work in firefox. but not working in internet explorer

A: 

Are you saying you are unable to get the username when you resubmit?

Are you using the spring security variable ${SPRING_SECURITY_LAST_USERNAME} as in

<input type="text" name="j_username" value="${SPRING_SECURITY_LAST_USERNAME}">
Raghuram
nope. not resubmit, when ntlm fail, i will fall back to form login. it's a problem that discussed in spring security forum by others. seem no solution
cometta
A: 

Firefox does not use NTLM authentication by default, whereas Internet Explorer does.

So unless you've deliberately configured your Firefox installation to use NTLM, then Firefox will be using some other type of authentication like Basic or Digest.

Both Basic and Digest use a simple username for authentication, so it make sense that after Firefox sends the username it will then be stored in j_username (or wherever else Spring Security store it).

In contrast, NTLM uses both a username and an NT domain to authentication. ie instead of "username" it might be "DOMAIN\username". The NTML username is meaningless without a domain, so an NTLM username is not really equivalent to a Basic or Digest username. Maybe that's why Spring Security isn't giving you the username — NTLM doesn't have a simple 'username' like other login methods do.

gutch