Beispiel #1
0
        void AppBeginRequest(object sender, EventArgs eventArgs)
        {
            if (HttpContext.Current.Response.StatusCode != 200)
            {
                Trace.Write("SiteMinder rules not running due to HTTP Status code: " + HttpContext.Current.Response.StatusCode);
                return;
            }

            // ignore files such as jpegs
            string ext = Path.GetExtension(HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath);

            if (!string.IsNullOrWhiteSpace(ext) || Utilities.Util.GetFileExtensions().Any(a => a == ext.ToLowerInvariant()))
            {
                return;
            }
            SiteMinder.ValidateWhiteList();
            SiteMinder.EnforceSsl();
            if (SiteMinder.AllRulesValid())
            {
                return;
            }
            var args = new SiteMinderFailuresEventArgs {
                Failures = SiteMinder.Failures
            };

            OnRuleRequestReported(args);
        }
Beispiel #2
0
        void AppBeginRequest(object sender, EventArgs eventArgs)
        {
            if (HttpContext.Current.Response.StatusCode != 200)
            {
                Trace.Write("SiteMinder rules not running due to HTTP Status code: " + HttpContext.Current.Response.StatusCode);
                return;
            }
            SiteMinder.ValidateWhiteList();
            SiteMinder.EnforceSsl();
            if (SiteMinder.AllRulesValid())
            {
                return;
            }
            var args = new SiteMinderFailuresEventArgs {
                Failures = SiteMinder.Failures
            };

            OnRuleRequestReported(args);
        }
Beispiel #3
0
 protected virtual void OnRuleRequestReported(SiteMinderFailuresEventArgs e)
 {
     RuleRequestReported?.Invoke(this, e);
 }