Beispiel #1
0
        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);
        }
Beispiel #2
0
 public VertexCommand(VertexConfig config)
 {
     _config = config;
     _client = new VertexClient(config);
 }
Beispiel #3
0
 public VertexClient(VertexConfig config)
 {
     _config = config;
 }