use of org.simbasecurity.dwclient.gateway.representations.AddRoleToUsersR in project simba-os by cegeka.
the class SimbaRoleService method addRoleToUser.
public void addRoleToUser(String ssoToken, SimbaRoleR simbaRole, SimbaUserR simbaUser) {
checkRoleNotNull(simbaRole);
checkUserNotNull(simbaUser);
AddRoleToUsersR postEntity = new AddRoleToUsersR(simbaRole, simbaUser);
ClientResponse clientResponse = getSimbaResource().path("role").path("addUsers").header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).cookie(new Cookie(AuthenticationConstants.SIMBA_SSO_TOKEN, ssoToken)).post(ClientResponse.class, postEntity);
handleError("addRole", simbaRole.getName(), simbaUser.getUserName(), clientResponse, logger);
}
Aggregations