I am doing form-based authentication, however the server that I want to
connect to is already set up to do basic authentication and is out of my
control.

:)
Julie

>>> [EMAIL PROTECTED] 02/27/03 10:48AM >>>
Why didn't you use Form authentication?
You have much more flexibility.

-----Original Message-----
From: Julie Steiner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 5:16 PM
Subject: Automatic Basic Authentication Question

Hello all, and thanks in advance for the help!  :)

>From my Struts Action, I am trying to forward to a new URL that uses
basic authentication.  I have already Authenticated the user, and
would
like to pass the user credentials to the webserver so that the
Authentication form will not 'pop up' .  I have attempted to put in
the
username:password in the authorization header, but this does not seem
to
work as of yet.
 
This is what I have done so far:

  BASE64Encoder encoder = new BASE64Encoder();

    String header = "username" + ":" + "password";
    String encodedHeader = encoder.encode(header.getBytes());
    response.addHeader("Authorization", "Basic " + encodedHeader);
    
   return (new ActionForward("my secured site", false));


Thanks Again!

Jules

---------------------------------------------------------------------
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 contents of this message have been scanned for viruses by
the TruSecure ShadowMail Service, and no viruses were found.

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

Reply via email to