Thank you!!! It´s working now.

Marcelo 

-----Mensagem original-----
De: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 12 de março de 2004 13:33
Para: Commons HttpClient Project
Assunto: RE: NTLM authenticity problem


Almost...

            client.getState().setCredentials(
                    null,
                    "200.233.96.36",
                    new NTCredentials("username", "password", "host",
"domain")
            );

NTLM authentication does not support the concept of the realm. Leave it
null.

Where 'host' is the IIS host name
      'domain' is the domain the IIS host belongs to

Oleg

-----Original Message-----
From: Marcelo Muzilli (IG) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 17:27
To: 'Commons HttpClient Project'
Subject: RES: NTLM authenticity problem
Importance: High


Oleg,
        how will be my code:

...
          client.getState().setAuthenticationPreemptive(false);

            client.getState().setCredentials(
                    "realm",
                    "200.233.96.36",
                    new NTCredentials()
                //new UsernamePasswordCredentials("username", "password")
            );
...

The IP number is my IIS Webserver.

Marcelo Muzilli

-----Mensagem original-----
De: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] Enviada
em: sexta-feira, 12 de março de 2004 13:17
Para: Commons HttpClient Project
Assunto: RE: NTLM authenticity problem


Marcelo,
HttpClient provides a _reasonable_ level of abstraction of different
authentication schemes. From the user (API) standpoint the NTLM
authentication is no different from the Basic authentication (see example
below):

http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/Ba
sicAuthenticationExample.java?rev=1.1.2.3&only_with_tag=HTTPCLIENT_2_0_BRANC
H&view=markup

The only difference is that one cannot do preemptive NTLM authentication and
one need to provide NTCredentials instead of UsernamePasswordCredentials
used by the Digest and Basic schemes

Hope this helps

Oleg



-----Original Message-----
From: Marcelo Muzilli (IG) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 16:00
To: 'Commons HttpClient Project'
Subject: RES: NTLM authenticity problem


I readed the page inside the link below. I will explain in a feel lines my
software. I have 02 servers that will produce the results:

01 server is a servlet server (a Tomcat server). This server will be
responsible to send a MMS message, mounted by the servlet program, to
another server; an IIS webserver (02). The only thing that doesn´t have
success is the loggin in the IIS server.

How can I loggin in the IIS webserver using Java servlet technology?

Marcelo

-----Mensagem original-----
De: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] Enviada
em: sexta-feira, 12 de março de 2004 11:00
Para: Commons HttpClient Project
Assunto: RE: NTLM authenticity problem


Have a look at the following document. If it does not help you to get
started, get back to me

http://jakarta.apache.org/commons/httpclient/authentication.html

Oleg

-----Original Message-----
From: Marcelo Muzilli (IG) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 14:51
To: 'Commons HttpClient Project'
Subject: RES: NTLM authenticity problem


Thank you Oleg for your quick response. But about my code. I will have to
use what class to authenticate me in the NTLM? TIA,

Marcelo

-----Mensagem original-----
De: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] Enviada
em: sexta-feira, 12 de março de 2004 10:43
Para: Commons HttpClient Project
Assunto: RE: NTLM authenticity problem


Marcelo,

AuthPolicy has been introduced in the development (post 2.0) version of
HttpClient which is currently in pre alpha development stage. It is not
present in the 2.0 (stable) version. AlternateAuthenticationExample.java is
not intended to be compileable against HttpClient 2.0. If you are of an
adventurous type, feel free to give the CVS HEAD snapshot a try to see
alternate authentication in action.

Oleg

-----Original Message-----
From: Marcelo Muzilli (IG) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 14:34
To: 'Commons HttpClient Project'
Subject: RES: NTLM authenticity problem


Hy Ortwin,
        I downloaded and put the JAR in my classpath, but when I try to
compile my servlet, it returns an error: "HttpClientTutorial.java": cannot
resolve symbol: class AuthPolicy in package auth at line 7, column 43" and
"HttpClientTutorial.java: cannot resolve symbol: variable AuthPolicy in
class HttpClientTutorial at line 48, column 20",        because it cannot
find the AuthPolicy class inside the package. Is this rigth?

Regards,

Marcelo

-----Mensagem original-----
De: Ortwin Glück [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 12
de março de 2004 10:17
Para: Commons HttpClient Project
Assunto: Re: NTLM authenticity problem

Get HttpClient from here:

http://jakarta.apache.org/commons/httpclient/downloads.html

Make sure you put the jar file on your classpath.

Ortwin Glück

Marcelo Muzilli (IG) wrote:

> Howdy people,
>       I´m a newbie in Servlet programming and I need to develop a code to
> > run in a Ms IIS Webserver (the code needs authenticate in the IIS > 
> > > > using
the NTLM authentication protocol).
>       I found a code that will authenticate me but I have not success for
> > this. I downloaded the .JAR and DOCs from the Jakarta homepage and > 
> > > > > if > > you try to compile the following example code (found in 
> > the > > > > link > > > > > > 
> > http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/exa
> > mp
> les/Al ternateAuthenticationExample.java), it returns na error because 
> > > >
there is no libs, listed above, inside the .JAR:
> > import org.apache.commons.httpclient.UsernamePasswordCredentials;
> import org.apache.commons.httpclient.auth.AuthPolicy;
> >     Please, where could I find it or please if somebody could help me? 
> > > > > > > > > > Thanks in advance, Marcelo Muzilli
> > > > ----------------------------------------------------------------
> > > > -----
> To unsubscribe, e-mail: > > > > 
> [EMAIL PROTECTED]
> For additional commands, e-mail: > > > > 
> [EMAIL PROTECTED]

--
  _________________________________________________________________
  NOSE applied intelligence ag

  ortwin glück                      [www]      http://www.nose.ch
  software engineer                 [email] [EMAIL PROTECTED]
  hardturmstrasse 171               [pgp id]           0x81CF3416
  8005 zürich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


****************************************************************************
***********************
The information in this email is confidential and may be legally privileged.
Access to this email by anyone other than the intended addressee is
unauthorized.  If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful.  If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.
****************************************************************************
***********************

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


****************************************************************************
***********************
The information in this email is confidential and may be legally privileged.
Access to this email by anyone other than the intended addressee is
unauthorized.  If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful.  If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.
****************************************************************************
***********************

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


****************************************************************************
***********************
The information in this email is confidential and may be legally privileged.
Access to this email by anyone other than the intended addressee is
unauthorized.  If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful.  If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.
****************************************************************************
***********************

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


****************************************************************************
***********************
The information in this email is confidential and may be legally privileged.
Access to this email by anyone other than the intended addressee is
unauthorized.  If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful.  If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.
****************************************************************************
***********************

---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to