private async Task <VertexTokenResponse> GetToken(VertexConfig config) { var body = new { scope = "calc-rest-api", grant_type = "password", client_id = config.ClientID, client_secret = config.ClientSecret, username = config.Username, password = config.Password }; var response = await $"{AuthUrl}/identity/connect/token".PostUrlEncodedAsync(body); var token = await response.GetJsonAsync <VertexTokenResponse>(); return(token); }
public VertexCommand(VertexConfig config) { _config = config; _client = new VertexClient(config); }
public VertexClient(VertexConfig config) { _config = config; }