[jcifs] NTLM HTTP authentication failure forward vs. Network
LogonDialog?
Michael B Allen
mba2000 at ioplex.com
Tue Aug 10 02:27:06 GMT 2004
Dave Trapp said:
> NTLMHttpFilter works great for our Intranet
> application.
>
> In instances when a user cannot authenticate
> transparently, we would like to forward them to a
> different URL (a guest view of our application) - as
> opposed to them getting challenged with the Network
> Logon Dialog.
>
> Through some trial-and-error we can get it to work
> some of the time. I don't think I understand the
> source that well though.
That's ok I think but just return after setting the redirect:
131 } catch( SmbAuthException sae ) {
132 if( sae.getNtStatus() ==
sae.NT_STATUS_ACCESS_VIOLATION ) {
133 /* Server challenge no longer valid for
134 * externally supplied password hashes.
135 */
136 System.err.println("ACCESS_VIOLATION");
137 HttpSession ssn = req.getSession(false);
138 if (ssn != null) {
139 ssn.removeAttribute( "NtlmHttpAuth" );
140 }
141 }
142 if( guestRedirectURL ) { /* set guestRedirectURL in init */
143 resp.sendRedirect( guestRedirectURL );
144 return;
145 }
146 resp.setHeader( "WWW-Authenticate", "NTLM" );
Mike
More information about the jcifs
mailing list