use of com.yahoo.elide.spring.security.AuthenticationUser in project elide by yahoo.
the class JsonApiController method elideDelete.
@DeleteMapping(value = "/**")
public Callable<ResponseEntity<String>> elideDelete(@RequestHeader HttpHeaders requestHeaders, @RequestParam MultiValueMap<String, String> allRequestParams, HttpServletRequest request, Authentication authentication) {
final String apiVersion = HeaderUtils.resolveApiVersion(requestHeaders);
final Map<String, List<String>> requestHeadersCleaned = HeaderUtils.lowercaseAndRemoveAuthHeaders(requestHeaders);
final String pathname = getJsonApiPath(request, settings.getJsonApi().getPath());
final User user = new AuthenticationUser(authentication);
final String baseUrl = getBaseUrlEndpoint();
return new Callable<ResponseEntity<String>>() {
@Override
public ResponseEntity<String> call() throws Exception {
ElideResponse response = elide.delete(baseUrl, pathname, null, convert(allRequestParams), requestHeadersCleaned, user, apiVersion, UUID.randomUUID());
return ResponseEntity.status(response.getResponseCode()).body(response.getBody());
}
};
}
Aggregations