/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='secret'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> GetTokenAsync(this ISpiceClient operations, string secret = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTokenWithHttpMessagesAsync(secret, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='secret'> /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <string> GetTokenWithHttpMessages(this ISpiceClient operations, string secret = default(string), Dictionary <string, List <string> > customHeaders = null) { return(operations.GetTokenWithHttpMessagesAsync(secret, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }