Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Automatic authentication j_security_check

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I'm currently using an existing Java Web Application. It uses the authentication and authorisation build into Tomcat. It uses a form which has to be submitted with a username and a password. Very common I think.

The situation is as follows:
The application is in an internal network.
People do not want to log in specifically to this application. They are logged into the network and are used to Single Sign On.
I have the code to get the username and password out based on the HTTP-Header.
I can print this on the screen without any problem.
I want to use the found password and username to authenticate in Tomcat, without showing a login-form.

Does anyone know an aprouch that will work? I've tried things with redirecting directly to j_security_check, but it seems that redirecting or forwarding in any way to j_security_check isn't allowed. I've also tried filling out the login-form (silent, so without showing the form) and submit this with Javascript. But I don't get this to work. Wrong Javascript I think.

Thanks a lot,

Regards,

Mark Monster
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark,

can't help you with that one, but i also want to get username and password out of the header. Can you post (email me) the code how to do that one?

Thanks!
 
M.K.A. Monster
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roel,

I used this code: http://www.rgagnon.com/javadetails/java-0441.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic