0 Replies Latest reply on Jun 15, 2015 2:02 AM by Peter Matthews

    JAAS CallbackHandler Unknwon handler - org.jboss.security.auth.callback.ObjectCallback

    Peter Matthews Newbie

      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.

          public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
              for (Callback callback : callbacks) {
                  if (callback instanceof NameCallback) {
                      NameCallback nameCallback = (NameCallback) callback;
                  } else if (callback instanceof PasswordCallback) {
                      PasswordCallback passwordCallback = (PasswordCallback) callback;
                  } //else if (callback instanceof org.jboss.security.auth.callback.ObjectCallback) {
                  // } 
                  else {
                      System.out.println("Unsupported callback: " + callback.getClass().getName());
                      throw new UnsupportedCallbackException(callback);