private AuthToken GetToken() { var request = new GetAuthTokenRequest(this.Serializer, TenantId, ClientId, ClientSecret); var webRequest = new HttpWebRequestWrapper(request.ApiEndpoint); return(request.Execute(webRequest)); }
private AuthToken GetToken(string tenantId, string clientId, string clientSecret) { var request = new GetAuthTokenRequest(this.Serializer, tenantId, clientId, clientSecret); using (var webRequest = WebRequestFactory.CreateWebRequest(request.ApiEndpoint)) { return(request.Execute(webRequest)); } }