[jcifs] NTLM HTTP authentication failure forward vs. Network LogonDialog?

Dave Trapp dtrapp at yahoo.com
Wed Aug 11 14:15:55 GMT 2004


Not sure if you want to include this, but I added
support for forwards to a guest URL when unable to
transparently authenticate using NtlmHttpFilter.

I suspect the same change needs to be offered for the
Servlet.

If you rather have a patch file, I'll have to figure
that out.

Thanks


--- Michael B Allen <mba2000 at ioplex.com> wrote:

> 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
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NtlmHttpFilter.java
Type: text/java
Size: 7562 bytes
Desc: NtlmHttpFilter.java
Url : http://lists.samba.org/archive/jcifs/attachments/20040811/949a4792/NtlmHttpFilter-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ntlmhttpauth.xml
Type: text/xml
Size: 24113 bytes
Desc: ntlmhttpauth.xml
Url : http://lists.samba.org/archive/jcifs/attachments/20040811/949a4792/ntlmhttpauth-0001.xml


More information about the jcifs mailing list