|
|
Silent NTLM Authentification from httpclient
Hi gurus,
I am trying to access web page protected by NTLM authentification
mechanism by httpclient. If I construct object
org.apache.commons.httpclient.NTCredentials (with my user name and
password) everything works fine.
But if I access this page from Microsoft Internet Explorer it does not
prompt me for my user name and password - so I think that this
information has to be stored somewhere in the system. It is possible
to get these NT credentials directly from the system and pass them to
httpclient to be used for authentification? Many thanks for reply.
Regards,
Pavel
|
|
0
|
|
|
|
Reply
|
palos
|
8/29/2004 6:08:43 AM |
|
On 29-8-2004 8:08, Pavel wrote:
> Hi gurus,
> I am trying to access web page protected by NTLM authentification
> mechanism by httpclient. If I construct object
> org.apache.commons.httpclient.NTCredentials (with my user name and
> password) everything works fine.
> But if I access this page from Microsoft Internet Explorer it does not
> prompt me for my user name and password - so I think that this
> information has to be stored somewhere in the system. It is possible
> to get these NT credentials directly from the system and pass them to
> httpclient to be used for authentification? Many thanks for reply.
>
> Regards,
> Pavel
Maybe it's available directly from Java, maybe you need a native call.
Since 1.4.2, NTLM has been added for, IIC, authentication during a
java.net.HttpURLConnection (and maybe others).
<http://java.sun.com/j2se/1.4.2/changes.html#networking>
Further, I've seen (and tried) some example programs part of JAAS
<http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/JAASRefGuide.html>
which allowed you to authenticate with the credentials of, IIRC, the
logged-in NT user.
Apparently it is possible to retrieve the credentials of a logged in
Windows user (the 'jaas_nt.dll' library in the JRE's bin directory
[Windows only] might be capable of doing this). But I don't know if
there is an API call directly available for this. That's for you to find
out... ;-)
--
Regards,
Z.
|
|
0
|
|
|
|
Reply
|
zoopy
|
8/29/2004 12:29:41 PM
|
|
|
1 Replies
411 Views
(page loaded in 0.034 seconds)
|
|
|
|
|
|
|
|
|