예제 #1
0
        public string RequestLoginToken(string username, string password)
        {
            var parameters = new Dictionary <string, string>
            {
                { "Email", username },
                { "Passwd", password },
                { "accountType", "GOOGLE" },
                { "service", "analytics" },
                { "source", _applicationName }
            };

            var response = _httpWrapper.Post("https://www.google.com/accounts/ClientLogin", parameters);

            var token = response.Remove(0, response.IndexOf("Auth=")).Replace("Auth=", string.Empty);

            return(token);
        }
예제 #2
0
 public override HttpResponseMessage Execute(AuthorizationRequest request)
 {
     return(httpWrapper.Post(this.Credentials, this.Header, this.Body, this.Url));
 }