Provides means to authenticate a user via a pop up login form.
Inheritance: IDisposable
コード例 #1
0
 /// <summary>
 /// Displays a pop up to login the user. An authentication Cookie is returned if the user is sucessfully authenticated.
 /// </summary>
 /// <param name="targetSiteUrl"></param>
 /// <param name="popUpWidth"></param>
 /// <param name="popUpHeight"></param>
 /// <returns></returns>
 public static CookieCollection GetAuthenticatedCookies(string targetSiteUrl, int popUpWidth, int popUpHeight)
 {
     CookieCollection authCookie = null;
     using (ClaimsWebAuth webAuth = new ClaimsWebAuth(targetSiteUrl, popUpWidth,popUpHeight))
     {
         authCookie = webAuth.Show();
     }
     return authCookie;
 }
コード例 #2
0
        /// <summary>
        /// Displays a pop up to login the user. An authentication Cookie is returned if the user is sucessfully authenticated.
        /// </summary>
        /// <param name="targetSiteUrl"></param>
        /// <param name="popUpWidth"></param>
        /// <param name="popUpHeight"></param>
        /// <returns></returns>
        public static CookieCollection GetAuthenticatedCookies(string targetSiteUrl, int popUpWidth, int popUpHeight)
        {
            CookieCollection authCookie = null;

            using (ClaimsWebAuth webAuth = new ClaimsWebAuth(targetSiteUrl, popUpWidth, popUpHeight))
            {
                authCookie = webAuth.Show();
            }
            return(authCookie);
        }