JAAS : on Callback ( Interesting based on HTTP headers )

Posted by VJS on Stack Overflow See other posts from Stack Overflow or by VJS
Published on 2012-06-12T04:36:56Z Indexed on 2012/06/12 4:39 UTC
Read the original article Hit count: 124

Filed under:
|
|
|

I am using NameCallback and PasswordCallback for username and password.For username and password, popup comes on browser and when i enter username ans password, JAAS authenticates my request.

On the wireshark, I have seen that 401 Unauthorized message (WWW-Authenticate header)comes and when i enter username/password HTTP request with credentials generate ( with Authorization header) and goes to server.

My requirement : I don't want pop up to come.My application on other server having username / password, so once it received 401 then based on some logic it will generate HTTP request with Authorization header / credentials and sent it back.

FLow : User -> Other Server -> My Tomcat5.5

Here on Other Server, nobody is available to enter username/password manually.Application is deployed and it will only generate HTTP request with credential and sent it back to tomcat.

Can we have any other callback which behave like this.Need your help.Please provide me feedback as well related to approach.

© Stack Overflow or respective owner

Related posts about java

Related posts about java-ee