/// <summary>
 /// Creates a shortcut URL resolver. The shortcut URL parameter is the application relative URL that this resolver will handle. For example, if the URL of
 /// the application is "integration.redstapler.biz/Todd" and you want to handle requests for "integration.redstapler.biz/Todd/admin", specify "admin"; to
 /// handle requests for the application root, specify the empty string. For a non-root URL, if you want it to have a trailing slash, you must include this
 /// slash at the end of the string. The specified function will be called when a request for the shortcut URL comes in and should return the resource you
 /// want to display. The resource may vary depending on the authenticated user, and returning null will display the Access Denied page. Do not return a
 /// resource that the authenticated user cannot access.
 /// </summary>
 public ShortcutUrlResolver(string shortcutUrl, ConnectionSecurity connectionSecurity, Func <ResourceInfo> function, Func <PageInfo> logInPageGetter = null)
 {
     ShortcutUrl        = shortcutUrl;
     ConnectionSecurity = connectionSecurity;
     Function           = function;
     LogInPageGetter    = logInPageGetter;
 }
 /// <summary>
 /// Creates a shortcut URL resolver. The shortcut URL parameter is the application relative URL that this resolver will handle. For example, if the URL of
 /// the application is "integration.redstapler.biz/Todd" and you want to handle requests for "integration.redstapler.biz/Todd/admin", specify "admin"; to
 /// handle requests for the application root, specify the empty string. For a non-root URL, if you want it to have a trailing slash, you must include this
 /// slash at the end of the string. The specified function will be called when a request for the shortcut URL comes in and should return the resource you
 /// want to display. The resource may vary depending on the authenticated user, and returning null will display the Access Denied page. Do not return a
 /// resource that the authenticated user cannot access.
 /// </summary>
 public ShortcutUrlResolver( string shortcutUrl, ConnectionSecurity connectionSecurity, Func<ResourceInfo> function, Func<PageInfo> logInPageGetter = null )
 {
     ShortcutUrl = shortcutUrl;
     ConnectionSecurity = connectionSecurity;
     Function = function;
     LogInPageGetter = logInPageGetter;
 }
Пример #3
0
 public override int GetHashCode()
 {
     if (m_hashCode == -1)
     {
         ConnectionSecurity connectionSecurity = m_connectionSecurity;
         m_hashCode = connectionSecurity.GetHashCode();
         HashCombine(ref m_hashCode, m_impersonateUser.GetHashCode());
         if (m_dataSourceType != null)
         {
             HashCombine(ref m_hashCode, m_dataSourceType.GetHashCode());
         }
         if (m_connectionString != null)
         {
             HashCombine(ref m_hashCode, m_connectionString.GetHashCode());
         }
         if (m_domainName != null)
         {
             HashCombine(ref m_hashCode, m_domainName.GetHashCode());
         }
         if (m_userName != null)
         {
             HashCombine(ref m_hashCode, m_userName.GetHashCode());
         }
         if (m_impersonateUserName != null)
         {
             HashCombine(ref m_hashCode, m_impersonateUserName.GetHashCode());
         }
     }
     return(m_hashCode);
 }
 public ConnectionKey(string dataSourceType, string connectionString, ConnectionSecurity connectionSecurity, string domainName, string userName, bool impersonateUser, string impersonateUserName)
 {
     this.m_dataSourceType      = dataSourceType;
     this.m_connectionString    = connectionString;
     this.m_connectionSecurity  = connectionSecurity;
     this.m_domainName          = domainName;
     this.m_userName            = userName;
     this.m_impersonateUser     = impersonateUser;
     this.m_impersonateUserName = impersonateUserName;
 }
Пример #5
0
        internal static bool ShouldBeSecureGivenCurrentRequest(this ConnectionSecurity connectionSecurity, bool isIntermediateInstallationPublicPage)
        {
            // Intermediate installations must be secure because the intermediate user cookie is secure.
            if (ConfigurationStatics.IsIntermediateInstallation && !isIntermediateInstallationPublicPage)
            {
                return(true);
            }

            return(connectionSecurity == ConnectionSecurity.MatchingCurrentRequest
                                       ? EwfApp.Instance != null && EwfApp.Instance.RequestState != null && EwfApp.Instance.RequestIsSecure(HttpContext.Current.Request)
                                       : connectionSecurity == ConnectionSecurity.SecureIfPossible && EwfConfigurationStatics.AppSupportsSecureConnections);
        }