using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/vault-forward/configs/{config_id}/authentications");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"kind\": \"mle\",\n \"display_name\": \"My Message Level Encryption\",\n \"fields\": [\n {\n \"key\": \"private_key\",\n \"value\": \"sk_test_26PHem9AhJZvU623DfE1x4sd\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);{
"type": "vault-forward-config-authentication",
"id": "faaad066-30b4-4997-a438-242b0752d7e1",
"created_at": "2012-12-12T10:53:43+00:00",
"updated_at": "2012-12-12T10:53:43+00:00",
"kind": "mle",
"label": "My MLE",
"display_name": "My MLE",
"fields": [
{
"key": "secret_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"creator": {
"id": "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5",
"name": "John L",
"email_address": "john@example.com"
}
}Configures a new Vault Forward authentication method. This allows the authentication method to be be applied in Vault Forward requests.
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/vault-forward/configs/{config_id}/authentications");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"kind\": \"mle\",\n \"display_name\": \"My Message Level Encryption\",\n \"fields\": [\n {\n \"key\": \"private_key\",\n \"value\": \"sk_test_26PHem9AhJZvU623DfE1x4sd\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);{
"type": "vault-forward-config-authentication",
"id": "faaad066-30b4-4997-a438-242b0752d7e1",
"created_at": "2012-12-12T10:53:43+00:00",
"updated_at": "2012-12-12T10:53:43+00:00",
"kind": "mle",
"label": "My MLE",
"display_name": "My MLE",
"fields": [
{
"key": "secret_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"creator": {
"id": "77a76f7e-d2de-4bbc-ada9-d6a0015e6bd5",
"name": "John L",
"email_address": "john@example.com"
}
}vault-forward-authentications.write scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the Vault Forward configuration.
"46973e9d-88a7-44a6-abfe-be4ff0134ff4"
Request body to create a Vault Forward authentication method.
The kind of authentication to be used in a Vault Forward request.
mle, mtls, signature "mle"
A custom name for the authentication method. This will be shown in the Admin UI.
1 - 50"My Message Level Encryption"
A list of fields, each containing a key-value pair for each field defined by the definition for this authentication method.
Show child attributes
Returns the created Vault Forward authentication method.
A configured Vault Forward authentication method.
The type of this resource. It is always vault-forward-config-authentication.
"vault-forward-config-authentication"
The ID of this Vault Forward authentication method.
"faaad066-30b4-4997-a438-242b0752d7e1"
The date and time when this configuration was created.
"2012-12-12T10:53:43+00:00"
The date and time when this configuration was last updated.
"2012-12-12T10:53:43+00:00"
The kind of authentication to be used in a Vault Forward request.
mle, mtls, signature "mle"
A label that describes this authentication method.
"My MLE"
The display name for this authentication method given when created.
"My MLE"
A list of fields, each containing a key-value pair for each field
configured for this authentication method. Fields marked as secret
are not returned.
Show child attributes
The user who created the Vault Forward authentication method.
Show child attributes
Was this page helpful?