The Java SDK wraps calls to the Cloudseal REST Api.

Before using this library you will need to obtain an Access Key and Secret your Cloudseal admin console (Settings -> API Access)

Sample usage

RESTClient restClient = new RestClientImpl("acme", "myAccessKey", "mySecret");
UserService userService = new UserServiceImpl(restClient);

CloudsealUser newUser = new CloudsealUser();
newUser.setUsername("newUser");
newUser.setFirstName("New");
newUser.setLastName("User");
newUser.setEmail("new.user@acme.com");

// Give user access to the Cloudseal admin console
CloudsealApplication cloudseal = new CloudsealApplication();
cloudseal.setId("CloudSeal");
cloudseal.getRoles().add("ADMIN");

newUser.getApplications().add(cloudseal);

newUser = userService.addUser(newUser);
String generatedPassword = newUser.getPassword();

// Release connection pool
restClient.destroy();