// Copy the application field to local instance to ensure that the
// currently loaded web application is used to process
// request
final WebApplication _application = application;
final ContainerRequest cRequest = new ContainerRequest(
_application,
request.getMethod(),
baseUri,
requestUri,
getHeaders(request),
request.getInputStream());
cRequest.setSecurityContext(new SecurityContext() {
public Principal getUserPrincipal() {
return request.getUserPrincipal();
}
public boolean isUserInRole(String role) {