Ejemplo de lista de usuarios de HSM.
- VĂ©ase la nota sobre ejemplos.
package doxy.examples;
import com.dinamonetworks.Dinamo;
import br.com.trueaccess.TacException;
public class ListUsers {
static String ipHSM = "127.0.0.1";
static String usr_admin = "master";
static String senha_admin = "12345678";
public static void main(String[] args) throws TacException {
Dinamo api = new Dinamo();
System.out.println("--> User login");
api.openSession(ipHSM, usr_admin, senha_admin);
System.out.println("--> List users");
String[] usrList = api.listUsers();
if (usrList == null) {
System.out.println("No users found");
return;
}
for (String user : usrList) {
System.out.println("User==>" + user);
}
api.closeSession();
System.out.println("The process ended sucessfully");
}
}