private void PerformLogin() { try { using (var client = new GhostWebClient()) { client.Login(GetUrl("/ghost/signin/"), GetUrl("/ghost/"), Login, Password); _token = client.Tag; _cookie = client.ConnSid; if (_cookie != null) _cookie.Path = _cookiePath; } } catch (WebException exception) { if ((int)((HttpWebResponse)exception.Response).StatusCode == 403) throw new GhostWrongUsernamePasswordException(); throw; } }
private void PerformLogin() { try { using (var client = new GhostWebClient()) { client.Login(GetUrl("/ghost/signin/"), GetUrl("/ghost/"), Login, Password); _token = client.Tag; _cookie = client.ConnSid; if (_cookie != null) { _cookie.Path = _cookiePath; } } } catch (WebException exception) { if ((int)((HttpWebResponse)exception.Response).StatusCode == 403) { throw new GhostWrongUsernamePasswordException(); } throw; } }