Examples of HttpServletRequestWrapper


Examples of com.netflix.zuul.http.HttpServletRequestWrapper

     *
     * @param servletRequest
     * @param servletResponse
     */
    public void init(HttpServletRequest servletRequest, HttpServletResponse servletResponse) {
        RequestContext.getCurrentContext().setRequest(new HttpServletRequestWrapper(servletRequest));
        RequestContext.getCurrentContext().setResponse(new HttpServletResponseWrapper(servletResponse));
        //RequestContext.getCurrentContext().setResponseStatusCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

                                      // in
                                      // case
                                      // of
                                      // nested
      _response.reset();
      servlet.service(new HttpServletRequestWrapper(
          (HttpServletRequest) _request) {
        public java.lang.String getPathInfo() {
          return dispatchLen >= dispatchPath.length() ? null
              : dispatchPath.substring(dispatchLen);
        }
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

                                      // case
                                      // of
                                      // nested
      ((Serve.ServeConnection) _response).setInInclude(true);
      try {
        servlet.service(new HttpServletRequestWrapper(
            (HttpServletRequest) _request) {
          public synchronized java.util.Enumeration getAttributeNames() {
            if (super
                .getAttribute("javax.servlet.include.request_uri") == null) {
              setAttribute("javax.servlet.include.request_uri",
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

                if (principal != null) {
                    principal.setAuthType(HttpServletRequest.BASIC_AUTH);
                    if (request instanceof WinstoneRequest)
                        ((WinstoneRequest) request).setRemoteUser(principal);
                    else if (request instanceof HttpServletRequestWrapper) {
                        HttpServletRequestWrapper wrapper = (HttpServletRequestWrapper) request;
                        if (wrapper.getRequest() instanceof WinstoneRequest)
                            ((WinstoneRequest) wrapper.getRequest())
                                    .setRemoteUser(principal);
                        else
                            Logger.log(Logger.WARNING, AUTH_RESOURCES,
                                    "BasicAuthenticationHandler.CantSetUser",
                                    wrapper.getRequest().getClass().getName());
                    } else
                        Logger.log(Logger.WARNING, AUTH_RESOURCES,
                                "BasicAuthenticationHandler.CantSetUser",
                                request.getClass().getName());
                }
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

        if (serverResponseDigest.equals(clientResponseDigest)) {
            principal.setAuthType(HttpServletRequest.DIGEST_AUTH);
            if (request instanceof WinstoneRequest)
                ((WinstoneRequest) request).setRemoteUser(principal);
            else if (request instanceof HttpServletRequestWrapper) {
                HttpServletRequestWrapper wrapper = (HttpServletRequestWrapper) request;
                if (wrapper.getRequest() instanceof WinstoneRequest)
                    ((WinstoneRequest) wrapper.getRequest())
                            .setRemoteUser(principal);
                else
                    Logger.log(Logger.WARNING, AUTH_RESOURCES,
                            "DigestAuthenticationHandler.CantSetUser", wrapper
                                    .getRequest().getClass().getName());
            } else
                Logger.log(Logger.WARNING, AUTH_RESOURCES,
                        "DigestAuthenticationHandler.CantSetUser", request
                                .getClass().getName());
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

        else {
            WinstoneRequest actualRequest = null;
            if (request instanceof WinstoneRequest) {
                actualRequest = (WinstoneRequest) request;
            } else if (request instanceof HttpServletRequestWrapper) {
                HttpServletRequestWrapper wrapper = (HttpServletRequestWrapper) request;
                if (wrapper.getRequest() instanceof WinstoneRequest) {
                    actualRequest = (WinstoneRequest) wrapper.getRequest();
                } else {
                    Logger.log(Logger.WARNING, AUTH_RESOURCES,
                            "FormAuthenticationHandler.CantSetUser", wrapper
                                    .getRequest().getClass().getName());
                }
            } else {
                Logger.log(Logger.WARNING, AUTH_RESOURCES,
                        "FormAuthenticationHandler.CantSetUser", request
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

                if (principal != null) {
                    principal.setAuthType(HttpServletRequest.CLIENT_CERT_AUTH);
                    if (request instanceof WinstoneRequest)
                        ((WinstoneRequest) request).setRemoteUser(principal);
                    else if (request instanceof HttpServletRequestWrapper) {
                        HttpServletRequestWrapper wrapper = (HttpServletRequestWrapper) request;
                        if (wrapper.getRequest() instanceof WinstoneRequest)
                            ((WinstoneRequest) wrapper.getRequest())
                                    .setRemoteUser(principal);
                        else
                            Logger.log(Logger.WARNING, AUTH_RESOURCES,
                                    "ClientCertAuthenticationHandler.CantSetUser",
                                            wrapper.getRequest().getClass().getName());
                    } else
                        Logger.log(Logger.WARNING, AUTH_RESOURCES,
                                "ClientCertAuthenticationHandler.CantSetUser",
                                request.getClass().getName());
                }
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

    {
        // Alternatively we can have an alias associated with a given key
        // Example: www.messageing.service : kermit
        final Principal principal = new SimplePrincipal(consumer.getKey());
        final Set<String> roles = getProvider().convertPermissionsToRoles(accessToken.getPermissions());
        return new HttpServletRequestWrapper(request){
            @Override
            public Principal getUserPrincipal(){
                return principal;
            }
            @Override
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

        String name = index != -1 ? openId.substring(index + 1) : openId;
       
        final Principal principal = new SimplePrincipal(name);
        final Set<String> roles = getRoles(name);
       
        return new HttpServletRequestWrapper(request){
            @Override
            public Principal getUserPrincipal(){
                return principal;
            }
            @Override
View Full Code Here

Examples of javax.servlet.http.HttpServletRequestWrapper

            OAuthConsumer consumer, OAuthToken accessToken)
    {
        final Principal principal = new SimplePrincipal(consumer.getKey());
        final Set<String> roles = getRoles(consumer);
       
        return new HttpServletRequestWrapper(request){
            @Override
            public Principal getUserPrincipal(){
                return principal;
            }
            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.