File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Callback Handlers

 
Ed B.
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
Is there a way to pass in extra parameters to a custom callback handler and fetch it back in the custom login module? My code is as follows:

LoginContext cntx = new LoginContext("test", new MyCallBackHandler(username, password, param1, param2));

MyLoginModule.java:
((MyCallbackHandler)callbackHandler).getParam1()
The above call throws a classcastexception because callbackHandler is an instance of SecureCallbackHandler which is an inner class of LoginContext.

Is there any other way of accomplishing what I am trying to do here?

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64181
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ed B.", please check your private messages.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic