NTLM authentication - how to get domain and host.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NTLM authentication - how to get domain and host.

Alexander Kitaev
Hello All,

I would like to support NTLM authentication scheme in my library when httpclient is used. As I understood I have to return instance of NTCredentials class in my CredentialsProvider implementation.

My question is whether there is way to get "host" and "domain" values without interaction with the user, i.e. are there any environment variables or system properties (assuming Windows OS) that could contain reasonable defaults for those properties?

Thanks!

Alexander Kitaev,
TMate Software,
http://tmatesoft.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NTLM authentication - how to get domain and host.

Bindul Bhowmik
Hi Alexander,

You could try gettting the value from the USERDOMAIN system property. But if
a user has logged on locally, or if the host against which you are trying to
authenticate is on a different domain than what the user is logging into,
your authentication might fail. This will work in Windows only, and will not
work for non-NT versions (Windows 98, ME, etc.)

Regards,
Bindul

On 9/1/05, Alexander Kitaev <[hidden email]> wrote:

>
> Hello All,
>
> I would like to support NTLM authentication scheme in my library when
> httpclient is used. As I understood I have to return instance of
> NTCredentials class in my CredentialsProvider implementation.
>
> My question is whether there is way to get "host" and "domain" values
> without interaction with the user, i.e. are there any environment
> variables or system properties (assuming Windows OS) that could contain
> reasonable defaults for those properties?
>
> Thanks!
>
> Alexander Kitaev,
> TMate Software,
> http://tmatesoft.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>