You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chapoor Chapoor <ch...@gmail.com> on 2006/05/09 13:33:45 UTC

JAASRealm programmatic call

Hi,

can someone provide me code for calling JAASRealm programmaticaly ?

I do something like this, but it fails:
    org.apache.catalina.realm.JAASRealm realm = new
org.apache.catalina.realm.JAASRealm();
    realm .setAppName("MyApp");
    realm.authenticate("john", "smith");

I know you can specify the JAASRealm in server.xml and let the container
call it, by adding auth-login in web.xml
But now I want to do everything programmaticly, call the
"ContainerAuthenticator" for user authentication on the fly.


Thank you.

Re: JAASRealm programmatic call

Posted by Chapoor Chapoor <ch...@gmail.com>.
Please advice.

Any developers from JAASRealm ???




On 5/9/06, Chapoor Chapoor <ch...@gmail.com> wrote:
>
>  Hi,
>
> can someone provide me code for calling JAASRealm programmaticaly ?
>
> I do something like this, but it fails:
>     org.apache.catalina.realm.JAASRealm realm = new
> org.apache.catalina.realm.JAASRealm();
>     realm .setAppName("MyApp");
>     realm.authenticate("john", "smith");
>
> I know you can specify the JAASRealm in server.xml and let the container
> call it, by adding auth-login in web.xml
> But now I want to do everything programmaticly, call the
> "ContainerAuthenticator" for user authentication on the fly.
>
>
> Thank you.
>