Package org.jboss.security.auth.callback

Examples of org.jboss.security.auth.callback.ByteArrayCallback


      if( handler == null )
         throw new LoginException("No CallbackHandler provied to SRPLoginModule");
     
      NameCallback nc = new NameCallback("Username: ", "guest");
      PasswordCallback pc = new PasswordCallback("Password: ", false);
      ByteArrayCallback bac = new ByteArrayCallback("Public key random number: ");
      TextInputCallback tic = new TextInputCallback("Auxillary challenge token: ");
      ArrayList tmpList = new ArrayList();
      tmpList.add(nc);
      tmpList.add(pc);
      if( externalRandomA == true )
         tmpList.add(bac);
      if( hasAuxChallenge == true )
         tmpList.add(tic);
      Callback[] callbacks = new Callback[tmpList.size()];
      tmpList.toArray(callbacks);
      try
      {
         handler.handle(callbacks);
         username = nc.getName();
         _password = pc.getPassword();
         if( _password != null )
            password = _password;
         pc.clearPassword();
         if( externalRandomA == true )
            abytes = bac.getByteArray();
         if( hasAuxChallenge == true )
            this.auxChallenge = tic.getText();
      }
      catch(java.io.IOException e)
      {
View Full Code Here


            TextInputCallback tc = (TextInputCallback) c;
            tc.setText(text);
         }
         else if( c instanceof ByteArrayCallback )
         {
            ByteArrayCallback bac = (ByteArrayCallback) c;
            bac.setByteArray(data);
         }
         else if (c instanceof ObjectCallback)
         {
            ObjectCallback oc = (ObjectCallback) c;
            oc.setCredential(credential);
View Full Code Here

      if( handler == null )
         throw new LoginException("No CallbackHandler provied to SRPLoginModule");
     
      NameCallback nc = new NameCallback("Username: ", "guest");
      PasswordCallback pc = new PasswordCallback("Password: ", false);
      ByteArrayCallback bac = new ByteArrayCallback("Public key random number: ");
      TextInputCallback tic = new TextInputCallback("Auxillary challenge token: ");
      ArrayList tmpList = new ArrayList();
      tmpList.add(nc);
      tmpList.add(pc);
      if( externalRandomA == true )
         tmpList.add(bac);
      if( hasAuxChallenge == true )
         tmpList.add(tic);
      Callback[] callbacks = new Callback[tmpList.size()];
      tmpList.toArray(callbacks);
      try
      {
         handler.handle(callbacks);
         username = nc.getName();
         _password = pc.getPassword();
         if( _password != null )
            password = _password;
         pc.clearPassword();
         if( externalRandomA == true )
            abytes = bac.getByteArray();
         if( hasAuxChallenge == true )
            this.auxChallenge = tic.getText();
      }
      catch(java.io.IOException e)
      {
View Full Code Here

   protected void setUp() throws Exception
   {
      ncb = new NameCallback("Enter Username:");
      pcb = new PasswordCallback("Enter Password:", false);
      mcb = new MapCallback();
      bacb = new ByteArrayCallback("Enter data");
   }
View Full Code Here

            TextInputCallback tc = (TextInputCallback) c;
            tc.setText(text);
         }
         else if( c instanceof ByteArrayCallback )
         {
            ByteArrayCallback bac = (ByteArrayCallback) c;
            bac.setByteArray(data);
         }
         else if (c instanceof ObjectCallback)
         {
            ObjectCallback oc = (ObjectCallback) c;
            oc.setCredential(credential);
View Full Code Here

            TextInputCallback tc = (TextInputCallback) c;
            tc.setText(text);
         }
         else if( c instanceof ByteArrayCallback )
         {
            ByteArrayCallback bac = (ByteArrayCallback) c;
            bac.setByteArray(data);
         }
         else if (c instanceof ObjectCallback)
         {
            ObjectCallback oc = (ObjectCallback) c;
            oc.setCredential(credential);
View Full Code Here

            TextInputCallback tc = (TextInputCallback) c;
            tc.setText(text);
         }
         else if( c instanceof ByteArrayCallback )
         {
            ByteArrayCallback bac = (ByteArrayCallback) c;
            bac.setByteArray(data);
         }
         else if (c instanceof ObjectCallback)
         {
            ObjectCallback oc = (ObjectCallback) c;
            oc.setCredential(credential);
View Full Code Here

TOP

Related Classes of org.jboss.security.auth.callback.ByteArrayCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.