Provides means to authenticate a user via a pop up login form.
Наследование: IDisposable
 /// <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);
        }