Created
October 30, 2018 04:27
-
-
Save ryanvgates/ee5c7a83f5140081112e82e60fccc9eb to your computer and use it in GitHub Desktop.
HashiCorp Vault Consumer Authenticate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dynamic user = new ExpandoObject(); | |
user.user_id = userId; | |
var content = new StringContent(JsonConvert.SerializeObject(user), Encoding.UTF8, "application/json"); | |
var cleanedappId = HttpUtility.UrlEncode(appId); | |
var response = client.PostAsync(url + $"auth/app-id/login/{cleanedappId}", content).Result; | |
var body = response.Content.ReadAsStringAsync().Result; | |
var serializedBody = JsonConvert.DeserializeObject<IDictionary<string, dynamic>>(body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment