コード例 #1
0
 /// <summary>
 /// Sets the intermediate user cookie.
 /// </summary>
 public static void SetIntermediateAuthenticationCookie()
 {
     // The intermediate user cookie is secure to make it harder for unauthorized users to access intermediate installations, which often are placed on the
     // Internet with no additional security.
     CookieStatics.SetCookie(
         intermediateAuthenticationCookieName,
         intermediateAuthenticationCookieValue,
         SystemClock.Instance.GetCurrentInstant() + Duration.FromDays(30),
         true,
         true);
 }
コード例 #2
0
 /// <summary>
 /// Clears the intermediate user cookie.
 /// </summary>
 public static void ClearCookie()
 {
     CookieStatics.ClearCookie(cookieName);
 }
コード例 #3
0
 /// <summary>
 /// Sets the intermediate user cookie.
 /// </summary>
 public static void SetCookie()
 {
     // The intermediate user cookie is secure to make it harder for unauthorized users to access intermediate installations, which often are placed on the
     // Internet with no additional security.
     CookieStatics.SetCookie(cookieName, cookieValue, DateTime.Now.AddMonths(1), true, true);
 }
コード例 #4
0
        internal static bool CookieExists()
        {
            var cookie = CookieStatics.GetCookie(cookieName);

            return(cookie != null && cookie.Value == cookieValue);
        }
コード例 #5
0
        internal static bool IntermediateAuthenticationCookieExists()
        {
            var cookie = CookieStatics.GetCookie(intermediateAuthenticationCookieName);

            return(cookie != null && cookie.Value == intermediateAuthenticationCookieValue);
        }
コード例 #6
0
 /// <summary>
 /// EWF use only.
 /// </summary>
 public static void SetWarningsHiddenCookie() =>
 CookieStatics.SetCookie(warningsHiddenCookieName, "", SystemClock.Instance.GetCurrentInstant() + Duration.FromHours(1), false, false);
コード例 #7
0
 /// <summary>
 /// BasicPage.master use only.
 /// </summary>
 public static bool WarningsHiddenCookieExists() => CookieStatics.GetCookie(warningsHiddenCookieName) != null;
コード例 #8
0
 /// <summary>
 /// Clears the intermediate user cookie.
 /// </summary>
 public static void ClearIntermediateAuthenticationCookie()
 {
     CookieStatics.ClearCookie(intermediateAuthenticationCookieName);
 }