AppHarbor.Web.Security.CookieAuthenticationModule.IsLoginPage C# (CSharp) Method

IsLoginPage() private method

private IsLoginPage ( HttpRequest request ) : bool
request System.Web.HttpRequest
return bool
	    private bool IsLoginPage(HttpRequest request)
		{
			try
			{
				var loginUrl = _configuration.LoginUrl;
				if (!loginUrl.StartsWith("/", StringComparison.Ordinal) && !loginUrl.StartsWith("~/"))
				{
					loginUrl = "~/" + loginUrl;
				}

				return string.Equals(request.PhysicalPath, request.MapPath(loginUrl), StringComparison.OrdinalIgnoreCase);
			}
			catch
			{
				return false; // Cannot risk it. If any exception is thrown, err on the safe side: assume it's not the login page.
			}
		}