Search in sources :

Example 1 with AddRoleToUsersR

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);
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) Cookie(javax.ws.rs.core.Cookie) AddRoleToUsersR(org.simbasecurity.dwclient.gateway.representations.AddRoleToUsersR)

Aggregations

ClientResponse (com.sun.jersey.api.client.ClientResponse)1 Cookie (javax.ws.rs.core.Cookie)1 AddRoleToUsersR (org.simbasecurity.dwclient.gateway.representations.AddRoleToUsersR)1