Passthrough credentials
Document Rails supports seamless copying of the input credential into the resulting document using the "passthrough credentials" mechanism. This functionality is especially useful for provenance tracking and data linkability.
Passthrough credentials can be utilised only in conjunction with W3C input credentials.
When the passthrough credential is copied, the output value is identical to that of the input credential to preserve the signature validity.
Usage
During the recipe creation process, you can specify the identifiers of credentials to be copied into the output document using the passthrough_credentials field:
import { createRecipe } from "@vaultie/document-rails";
const response = await createRecipe(
client,
accessToken,
organizationId,
{
// ... other fields go here
// List of credential identifiers to pass into the resulting document as-is.
passthrough_credentials: [
exampleCredentialId,
// ...
],
}
);
Recipes with passthrough credentials expect the identifiers provided in passthrough_credentials to be present in the credentials field during the printing process:
import { printRecipe } from "@vaultie/document-rails";
const response = await printRecipe(
client,
accessToken,
organizationId,
recipeId,
{
// ... other fields go here
credentials: {
// This object must contain all credentials listed in the `passthrough_credentials` field
// within the configured recipe.
[exampleCredentialId]: {
// ...
}
},
}
);