commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Becke" <>
Subject RE: NTLM authentication
Date Fri, 25 Apr 2003 12:33:02 GMT
Hi !

Thank You for the reply ! I still can't make this work, though. I am
currently using the 20030424 snapshot. My problem is as following :
I am runnning my program on an AIX box, which does of course not have
a WINS name nor is it member of any NT domain. The other API I have
tried (HTTP client library :,
NTLM authenticator :
uses five pieces of information for construction of the NTLM auth
response; host, host domain, user, user domain, password. But, it
authenticates fine even with garbage data for host and host domain, so it
is obviously possible to authenticate using just user name, user domain and
password. This makes perfect sense, as NTLM authentication should be
possible from IE on any internet-connected Windows box. The problem I
face then is; given just the following data :

  user's NT domain
  user's password
  URL on IIS server requiring NTLM authentication

How do I construct a valid NTCredentials instance, and authenticate
to the given URL ?

kind regards,

  Richard Becke

/* ®ß */

<quote who="André Augusto de Oliveira Aragão">
> HI!
> I´m using it. It had a bug, but in the most recent nightly snapshot,
> it´s corrected.
> The arguments in the NTCredentials constructor are:
> userName - the userid.
> password - the password.
> host - For me, it works with the wins name of the host that is making
> the connection. I did not test if using the dns or ip works. I think it
> depends on your server (the server you´re trying to reach)
> configuration.
> domain - the actual NT Domain.
> Hope that helps,
> Andre
> -----Original Message-----
> From: Richard Becke []
> Sent: quinta-feira, 24 de abril de 2003 04:32
> To:
> Cc:
> Subject: NTLM authentication
> I am using HTTPClient 2.0 alpha 3 on AIX 4.3.3
> / IBM JDK 1.3.1 with IBM JCE / JSSE.
> Has anyone actually made NTLM authentication work ? I can't figure it
> out. Using Luigi Dragone's NTLM auth API
> (, everything works
> fine, so I know that the credentials and cryptographic providers are OK.
> The documentation for NTCredentials, as well as the example / test code
> seems a bit lacking. Is the "userName" constructor argument supposed to
> be "<NT domain>\<userid>" or just userid ? And the "host" argument; is
> this the DNS name, WINS name, and with / without the domain part ?
> Sorry for the cross posting, I know this belongs in the user list, but I
> feel the lacking documentation is also a bug.
> --
> /* ®ß */
> --------------------------------------------------------------------- To
> unsubscribe, e-mail:
> For additional commands, e-mail:
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: For
> additional commands, e-mail:

View raw message