code: public String[] getAttributeNames() {
          synchronized (attributes) {
              return attributes.keySet().toArray(new String[attributes.keySet().size()]);
          }
      }
docs: Returns the names of the attributes available to this credentials instance. This method returns an empty array if the
  credentials instance has no attributes available to it.
  
  @return a string array containing the names of the stored attributes