public ResteasyRequestWrapper(final HttpServletRequest request, final String httpMethod, final String prefix) throws ServletException, IOException { this.httpServletRequest = request; ResteasyHttpHeaders headers = ServletUtil.extractHttpHeaders(request); ResteasyUriInfo uriInfo = ServletUtil.extractUriInfo(request, prefix); // TODO: how are we supposed to get the response to create the // wrapper!!!!? The null response will only make it so that the // Asynchronous invocations won't work // HttpServletResponseWrapper theResponse = new // HttpServletResponseWrapper(httpServletResponse, dispatcher // TODO: the two nulls are the response and the dispatcher. Those // are not needed here... They are only needed for asynchronous // invocations. Suggest Core RESTEasy refactoring to change the // async invocation httpRequest = new HttpServletInputMessage(request, null, null, null, headers, uriInfo, httpMethod .toUpperCase(), null); }
uriInfo = ServletUtil.extractUriInfo(request, servletMappingPrefix);
@Produces @RequestScoped @JaxRsQualifier public UriInfo getUriInfo() { return ServletUtil.extractUriInfo(getHttpServletRequest(), ""); }
@Produces @RequestScoped @JaxRsQualifier public UriInfo getUriInfo() { return ServletUtil.extractUriInfo(getHttpServletRequest(), ""); }
@Produces @RequestScoped @JaxRsQualifier public UriInfo getUriInfo() { return ServletUtil.extractUriInfo(getHttpServletRequest(), ""); }
@Produces @RequestScoped @JaxRsQualifier public UriInfo getUriInfo() { return ServletUtil.extractUriInfo(getHttpServletRequest(), ""); }
return ServletUtil.extractUriInfo(request, mappingPrefix);
protected void redirectToWelcomePage(Request request, HttpServletResponse response) throws IOException { ResteasyUriInfo uriInfo = ServletUtil.extractUriInfo(request, null); String[] welcomes = context.findWelcomeFiles(); if (welcomes.length > 0) { UriBuilder welcome = uriInfo.getBaseUriBuilder().path(welcomes[0]); response.sendRedirect(welcome.toTemplate()); } else { response.setStatus(204); } }
/** * Start the process of obtaining an access token by redirecting the browser * to the authentication server * * * * @param relativePath path relative to context root you want auth server to redirect back to * @param request * @param response * @throws IOException */ public void redirectRelative(String relativePath, HttpServletRequest request, HttpServletResponse response) throws IOException { ResteasyUriInfo uriInfo = ServletUtil.extractUriInfo(request, null); String redirect = uriInfo.getBaseUriBuilder().path(relativePath).toTemplate(); redirect(redirect, request, response); }
protected ManagedResourceConfig getRealmRepresentation(Request request) { ManagedResourceConfig rep = new ManagedResourceConfig(); ResteasyUriInfo uriInfo = ServletUtil.extractUriInfo(request, null); UriBuilder authUrl = uriInfo.getBaseUriBuilder().path(context.getLoginConfig().getLoginPage()); UriBuilder codeUrl = uriInfo.getBaseUriBuilder().path(ServletActionURLs.J_OAUTH_RESOLVE_ACCESS_CODE); rep.setRealm(skeletonKeyConfig.getRealm()); rep.setRealmKey(realmPublicKeyPem); rep.setAuthUrl(authUrl.toTemplate()); rep.setCodeUrl(codeUrl.toTemplate()); rep.setAdminRole(skeletonKeyConfig.getAdminRole()); return rep; }
uriInfo = ServletUtil.extractUriInfo(request, servletMappingPrefix);
uriInfo = ServletUtil.extractUriInfo(request, servletMappingPrefix);
uriInfo = ServletUtil.extractUriInfo(request, servletMappingPrefix);