Example #1
0
        private AuthToken GetToken()
        {
            var request = new GetAuthTokenRequest(this.Serializer, TenantId, ClientId, ClientSecret);

            var webRequest = new HttpWebRequestWrapper(request.ApiEndpoint);

            return(request.Execute(webRequest));
        }
Example #2
0
        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));
            }
        }