Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.gumga.security;
import com.wordnik.swagger.annotations.ApiOperation;
import io.gumga.core.GumgaThreadScope;
import io.gumga.core.GumgaValues;
import io.gumga.domain.integration.IntegrationEspecificationDTO;
import io.gumga.presentation.api.GumgaJsonRestTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.transaction.Transactional;
import java.util.List;
import java.util.Map;
import org.springframework.web.client.RestClientException;
/**
* Classe que contém métodos de integração do segurança
* Created by mateus on 07/02/17.
*/
@RestController
@RequestMapping("/api/security-embedded")
public class GumgaSecurityEmbeddedProxy {
private final RestTemplate restTemplate;
@Autowired
private GumgaValues gumgaValues;
public GumgaSecurityEmbeddedProxy() {
restTemplate = new GumgaJsonRestTemplate();
}
/**
* @return Url do segurança
*/
public String getSecurityUrl() {
return gumgaValues.getGumgaSecurityUrl().replace("publicoperations", "");
}
/**
* Lista os usuários de uma organização
* @param id Id da organização
* @return Lista de usuários
*/
@Transactional
@ApiOperation(value = "UsersByOrganization", notes = "Lista os usuários de uma organização")
@RequestMapping(value = "/organization/{organizationId}/users", method = RequestMethod.GET)
public List