Example #1
0
 public void requestAuth(AuthRequest request) {
   String[] names = request.getRequestFields();
   String[] keys = new String[names.length];
   for (int i = 0; i < names.length; i++) {
     // prompt the user with a dialog
     String key = "";
     while (key.length() == 0) {
       key =
           (String)
               JOptionPane.showInputDialog(
                   this,
                   "Please enter key for: " + names[i],
                   "ExtempFiller2",
                   JOptionPane.PLAIN_MESSAGE);
     }
     keys[i] = key;
   }
   AuthManager.respondAuth(new AuthResponse(names, keys));
 }