Example #1
0
        protected override void OnSendingProxyRequest(HttpContext context, HttpWebRequest request)
        {
            OutboundProxySession outboundProxySession = (OutboundProxySession)context.User;

            ExTraceGlobals.ProxyTracer.TraceInformation <string, Uri>(0, 0L, "Sending Proxy Request. User={0}, Url={1}", outboundProxySession.NameForEventLog, request.RequestUri);
            ProxyWebSession.AddSecurityContextHeader(request, outboundProxySession);
        }
Example #2
0
        public void SendProxyLogon(Uri baseUri, OutboundProxySession session, Action <HttpStatusCode> onProxyLogonSucceeded, Action <Exception> onProxyLogonFailure)
        {
            Uri            requestUri = new Uri(baseUri, "proxyLogon.ecp");
            HttpWebRequest request    = base.CreateRequest(requestUri, "POST");

            ProxyWebSession.AddSecurityContextHeader(request, session);
            base.Send <HttpStatusCode>(request, new SerializedAccessTokenBody(session.RbacConfiguration.SecurityAccessToken), (HttpWebResponse response) => response.StatusCode, delegate(HttpStatusCode statusCode)
            {
                onProxyLogonSucceeded(statusCode);
            }, onProxyLogonFailure);
        }
Example #3
0
        private ProxyConnection(string virtualDirectory, ProxyWebSession proxyWebSession) : base(virtualDirectory, proxyWebSession)
        {
            this.ProxyWebSession              = proxyWebSession;
            proxyWebSession.RequestException += this.ProxyWebSession_RequestException;
            Action <ProxyConnection> newProxyConnection = ProxyConnection.NewProxyConnection;

            if (newProxyConnection != null)
            {
                newProxyConnection(this);
            }
        }