hello,
since a couple days i try to increase my understanding of JAASRealm.
but this ongoing classcastexceptions do give me a hard time...
tomcat 5.0.28
my goal is to authenticate users via servlet (FORM).
so i tried this;
[LoginServlet]:
....
MyCallbackHandler handler = new MyCallbackHandler(name,password);
LoginContext context = new LoginContext("ModulName", handler);
context.login();
....
which results in that wellknown cce, as soon as my modul in its
login-method wants to retrieve 'MyCallbackHandler'
[AuthModul]:
...
public boolean login() throws LoginException {
...
MyCallBackHandler handler = (MyCallBackHandler) this.handler;
// right here the cce is thrown
...
...
so my thinking melts down to the following:
i would like to keep all classes below WEB-INF and dont want to touch
$CATALINA_HOME/server/lib or - /common/lib
but where to put the custom AuthenticationModule, Handler, Principals
if this results in the reported loader-issue
the changelog for 5.0.28 mentions that u can define in your Realm-definition,
if the Auth-Module should be loaded by your context-classloader.
useContextClassLoader="true" //default
but even if i set it to false, its still loaded by the webappclassloader
AuthModule/MyCallbackhandler loaded by WebAppClassloader,
LoginContext / SecureCallbackhandler loaded by 'null'
can anybody point me in the right direction?
thanks in advance
rene
--
gpg-key 8FC78254 http://www.so36.net/keys/rene.asc
fingerprint: E883 D359 3F56 51AF 0294 8BEB 16B3 15BD 8FC7 8254
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]