Beispiel #1
0
        private OAuthTokenCreateOptions SetupOAuthTokenCreateOptions(
            OAuthTokenCreateOptions options)
        {
            if (options == null)
            {
                options = new OAuthTokenCreateOptions();
            }

            if (options.ClientSecret == null)
            {
                options.ClientSecret = this.Client.ApiKey;
            }

            return(options);
        }
 public virtual Task <OAuthToken> CreateAsync(OAuthTokenCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(this.PostRequestAsync <OAuthToken>($"{Urls.BaseConnectUrl}/oauth/token", options, requestOptions, cancellationToken));
 }
 public virtual OAuthToken Create(OAuthTokenCreateOptions options, RequestOptions requestOptions = null)
 {
     return(this.PostRequest <OAuthToken>($"{Urls.BaseConnectUrl}/oauth/token", options, requestOptions));
 }
Beispiel #4
0
 public virtual Task <OAuthToken> CreateAsync(OAuthTokenCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
 {
     options = this.SetupOAuthTokenCreateOptions(options);
     return(this.CreateEntityAsync(options, requestOptions, cancellationToken));
 }
Beispiel #5
0
 public virtual OAuthToken Create(OAuthTokenCreateOptions options, RequestOptions requestOptions = null)
 {
     options = this.SetupOAuthTokenCreateOptions(options);
     return(this.CreateEntity(options, requestOptions));
 }