Beispiel #1
0
 public virtual void AuthorizeUser(string username, string password)
 {
     try
     {
         var     rawJson             = _client.GetRawResultOfBasicPostRequest($"{AuthEndpoint}?username={username}&password={WebUtility.UrlEncode(password)}");
         dynamic wordpressCredential = JsonConvert.DeserializeObject(rawJson);
         Token = wordpressCredential.token;
     }
     catch (Exception ex)
     {
         throw new WordpressAuthorizationException(ex);
     }
 }