Hi there,
I think I found the problem with the CallBackHanlder I have implemented in my ware file to handle a custom login form. One of the callbacks is of the type org.jboss.security.auth.callback.ObjectCallback. If U throw an unsupportedcallbackexception then the login fails. I am not sure what to do with this handler. Also the application can be deployed to different application servers so need a application server independent way to handle this.
@Override
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (Callback callback : callbacks) {
if (callback instanceof NameCallback) {
NameCallback nameCallback = (NameCallback) callback;
nameCallback.setName(txtUsername.getText());
} else if (callback instanceof PasswordCallback) {
PasswordCallback passwordCallback = (PasswordCallback) callback;
passwordCallback.setPassword(txtPassword.getText().toCharArray());
} //else if (callback instanceof org.jboss.security.auth.callback.ObjectCallback) {
// }
else {
System.out.println("Unsupported callback: " + callback.getClass().getName());
throw new UnsupportedCallbackException(callback);
}
}
thanks