Java API
HSM Dinamo
Loading...
Looking for...
No entries found
ListUsers.java

Example list of HSM users.

See Note on examples.
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");
}
}