I tried to use the ClientLoginModule for my standalone applicaion but something goes wrong.
After I do a lc.login() the LoginModule throws an Exception because it can't find a CallbackHandler ( the CallbackHandler = null).
To say in Detail:
// let the LoginContext instantiate a new Subject
LoginContext lc = null;
lc = new LoginContext("example1");
// authenticate the Subject
I'm not quite sure from where I should get that CallbackHandler? Should I call the initialize(...) method?
I'm thankful for any advice.
I figured it out myself.
I used the wrong Constructor for the Login Context. The right Constructor was:
lc = new LoginContext("example1", new MyCallbackHandler());
Where MyCallbackHandler is a Class that implements the Interface "CallbackHandler". I took the code for "MyCallbackHandler" from the jaas example from java. That worked fine :-)