geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject Re: JAAS and OpenejbRemoteLoginModule
Date Thu, 10 Jan 2008 09:15:45 GMT
On Jan 10, 2008 10:04 AM, Jonathan Chen <jonc@chen.org.nz> wrote:

> I ran my EjbClient with:
>
>         java -Djava.security.auth.login.config=MyApp.jaas -jar MyApp.jar
>
> with MyApp.jaas in the same directory containing:
>
>         MyApp
>         {
>                 org.apache.geronimo.openejb.OpenejbRemoteLoginModule required
>                         org.apache.geronimo.openejb.OpenejbRemoteLoginModule.RemoteSecurityRealm="MyAppRealm"
>                         org.apache.geronimo.openejb.OpenejbRemoteLoginModule.ServerURI="ejbd://localhost:4201";
>
>         };
>
> The big trick was finding OpenejbRemoteLoginModule in
> geronimo-openejb-2.0.2.jar and pulling the required dependancies.
>
> My EjbClient snippet is pretty simple:
>
>     LoginContext
>         loginCtx = new LoginContext (
>                     "MyApp",
>                     new ClientCallbackHandler ("joeuser", "joespassword"));
>     loginCtx.login ();
>
> with the ClientCallBackHandler class based on:
>
>     http://java.sun.com/javase/6/docs/technotes/guides/security/jaas/tutorials/SampleAcn.java

That's exactly that sort of answer I appreciate the most. Very concise
and clear. Thanks.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message