Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I don't think testimonials would have enticed me to become a member, or even use the site for that matter. I use the site for a learning experience..."

Geography

Where in the world do Tek-Tips members come from?

NTLM (Windows Authentication)

BillyKrow (Programmer)
26 Feb 09 17:40
We have a need to authenticate a user in a servlet using NTLM security then forward the user on to the secure site running on IIS to bypassing the IIS log in.  Using the java.net.Authenticator class, I can get the below to load the requested page, but since no authentication data is stored to the session, any subsequent requests to the site will require you to log in again.  I'm guessing I need to set the authentication header in the response but not sure how to do that.

    Authenticator.setDefault(new MyAuthenticator());

    URL url = new URL("http://www.iisapp.com");    
    InputStream ins = url.openConnection().getInputStream();
    BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
    String str;
    PrintWriter out = response.getWriter();
    while((str = reader.readLine()) != null) {
      out.println(str);
    }      

    out.flush();
    out.close();
 
BillyKrow (Programmer)
2 Mar 09 15:51
The problem with any of these implementations including this one is none of them seem to set the authentication credentials in the response/session.  So they all work to load a single page but subsequent calls from that page do not work.   

Basically I'm authenticating an IIS application from a WebSphere server on different domains and I simply want to authenticate and foward the request to the IIS server bypassing the log in.   

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close