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

            var webRequest = new HttpWebRequestWrapper(request.ApiEndpoint);

            return(request.Execute(webRequest));
        }
예제 #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));
            }
        }