Using HTTP Basic Authentication with JAAS
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   V_Leher
Posted On:   Wednesday, February 26, 2003 12:24 PM

I would like to use the HTTP basic authentication for a webapplication using JAAS . I am not able to figure out as to how to write the CallBackHandler to invoke the browser pop-window/use the Basic Authentication of HTTP to get the user name and password.


I know there is a DialogCallBackHandler in jdk1.4 but i am looking at something in jdk1.3.1. I did read some articles stating that it is possible.


Any help is appreciated.


thanks

Re: Using HTTP Basic Authentication with JAAS

Posted By:   James_Bayer  
Posted On:   Wednesday, February 26, 2003 01:42 PM

if you already have captured the user name and password (via web form, applet params, or awt etc.) you can use something like this:

Authenticator.setDefault(
new Authenticator()
{
protected PasswordAuthentication getPasswordAuthentication()
{
return new PasswordAuthentication( strUser, strPassword.toCharArray() );
}
});
About | Sitemap | Contact