This specification describes a Linked Data vocabulary for Verifiable Credentials related to Food Allergies, such as a person asserting their food allergies or for indicating the presence of allergens in food and beverages.
Comments regarding all aspects of this document are welcome. Please file issues directly on GitHub, or send them to food-allergen-vocab@safebites.com.
This specification describes a Linked Data vocabulary for Verifiable Credentials related to Food Allergies, such as a person asserting their food allergies or for indicating the presence of allergens in food and beverages.
The following use cases outline a number of key scenarios that readers might find useful:
The following example is provided as a simple example of when this vocabulary is used by a person to assert their food allergies:
{ "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/foodallergen/v1" ], "id": "https://authoritative.issuer/credentials/83627465", "type": ["VerifiableCredential", "FoodAllergyCard"], "issuer": "did:example:28394728934792387", "identifier": "83627465", "name": "Food Allergy Card", "description": "Personal Food Allergy Credential", "issuanceDate": "2020-08-15T12:20:25Z", "expirationDate": "2029-08-15T12:20:25Z", "credentialSubject": { "id": "did:example:b34ca6cd37bbf23", "type": "Person", "givenName": "JOHN", "familyName": "SMITH", "image": "data:image/png;base64,iVBORw0KGgo...kJggg==", "allergenMustard": false, "allergenLactose": false, "allergenEgg": false, "allergenPeanut": true, "allergenSoy": true, "allergenGluten": true, "allergenTreenut": true, "allergenCrustacean": false, "allergenShellfish": false, "allergenFish": false, "allergenSesame": false, "allergenSulphites": false }, "proof": { "type": "Ed25519Signature2018", "created": "2020-01-30T03:32:15Z", "jws": "eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag", "proofPurpose": "assertionMethod", "verificationMethod": "did:example:28394728934792387#keys-7f83he7s8" } }
The following example is provided as a simple example of when this vocabulary is used to indicate the presence of food allergens in a food or beverage item:
{ "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/foodallergen/v1" ], "id": "https://authoritative.issuer/credentials/83627465", "type": ["VerifiableCredential", "FoodAllergenLabel"], "issuer": "did:example:28394728934792387", "identifier": "83627465", "name": "Food Allergen Label", "description": "Food Allergen Credential", "issuanceDate": "2020-08-15T12:20:25Z", "expirationDate": "2029-08-15T12:20:25Z", "credentialSubject": { "id": "did:example:b34ca6cd37bbf23", "type": "FoodBeverageItem", "allergenMustard": false, "allergenLactose": false, "allergenEgg": false, "allergenPeanut": true, "allergenSoy": true, "allergenGluten": true, "allergenTreenut": true, "allergenCrustacean": false, "allergenShellfish": false, "allergenFish": false, "allergenSesame": false, "allergenSulphites": false }, "proof": { "type": "Ed25519Signature2018", "created": "2020-01-30T03:32:15Z", "jws": "eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag", "proofPurpose": "assertionMethod", "verificationMethod": "did:example:28394728934792387#keys-7f83he7s8" } }
This vocabulary assumes all terms specified in the base Verifiable Credentials [[VC-DATA-MODEL]] context. In addition, the following classes are available for specifying information related to residency and citizenship status.
Class | Description |
---|---|
FoodAllergyCard | Specifies that the credential is a food allergy card. |
FoodAllergenLabel | Specifies that the credential is a food allergen label on a food or beverage item. |
Person | Specifies that the subject of the credential is a person with food allergies. |
FoodBeverageItem | Specifies that the subject of the credential is a food or beverage item. |
This document also specifies the following terms for expressing food allergy status:
Term | Description |
---|---|
familyName | The name of the family with which the individual identifies. |
givenName | The non-family name with which the individual identifies. |
image | A representative image of the individual. |
allergenCrustacean | Indicates a Crustacean food allergen or allergy. |
allergenEgg | Indicates an Egg food allergen or allergy. |
allergenFish | Indicates a Fish food allergen or allergy. |
allergenGluten | Indicates a Gluten food allergen or allergy. |
allergenLactose | Indicates a Lactose food allergen or allergy. |
allergenMustard | Indicates a Mustard food allergen or allergy. |
allergenPeanut | Indicates a Peanut food allergen or allergy. |
allergenSesame | Indicates a Sesame food allergen or allergy. |
allergenShellfish | Indicates a Shellfish food allergen or allergy. |
allergenSoy | Indicates a Soy food allergen or allergy. |
allergenSulphites | Indicates a Sulphites food allergen or allergy. |
allergenTreenut | Indicates a Treenut food allergen or allergy. |
An alternate identifier used by the issuer of the credential to refer to information associated with the credential.
Term | identifier |
URL | http://schema.org/identifier |
Expected Value | string |
Specifies that the credential is a food allergy card.
Term | FoodAllergyCard |
URL | https://w3id.org/foodallergen#FoodAllergyCard |
Expected Value | Class |
Specifies that the credential is a food allergen label.
Term | FoodAllergenLabel |
URL | https://w3id.org/foodallergen#FoodAllergenLabel |
Expected Value | Class |
Specifies that the subject of the credential is a person.
Term | Person |
URL | http://schema.org/Person |
Expected Value | Class |
Specifies that the subject of the credential is a food or beverage item.
Term | FoodBeverageItem |
URL | https://w3id.org/foodallergen#FoodBeverageItem |
Expected Value | Class |
The name of the family with which the individual identifies.
Term | familyName |
URL | http://schema.org/familyName |
Expected Value | string |
The non-family name with which the individual identifies.
Term | givenName |
URL | http://schema.org/givenName |
Expected Value | string |
A representative image of the individual.
Term | image |
URL | http://schema.org/image |
Expected Value | string |
Indicates a Crustacean food allergen or allergy.
Term | allergenCrustacean |
URL | https://w3id.org/foodallergen#allergenCrustacean |
Expected Value | boolean |
Indicates an Egg food allergen or allergy.
Term | allergenEgg |
URL | https://w3id.org/foodallergen#allergenEgg |
Expected Value | boolean |
Indicates a Fish food allergen or allergy.
Term | allergenFish |
URL | https://w3id.org/foodallergen#allergenFish |
Expected Value | boolean |
Indicates a Gluten food allergen or allergy.
Term | allergenGluten |
URL | https://w3id.org/foodallergen#allergenGluten |
Expected Value | boolean |
Indicates a Lactose food allergen or allergy.
Term | allergenLactose |
URL | https://w3id.org/foodallergen#allergenLactose |
Expected Value | boolean |
Indicates a Mustard food allergen or allergy.
Term | allergenMustard |
URL | https://w3id.org/foodallergen#allergenMustard |
Expected Value | boolean |
Indicates a Peanut food allergen or allergy.
Term | allergenPeanut |
URL | https://w3id.org/foodallergen#allergenPeanut |
Expected Value | boolean |
Indicates a Sesame food allergen or allergy.
Term | allergenSesame |
URL | https://w3id.org/foodallergen#allergenSesame |
Expected Value | boolean |
Indicates a Shellfish food allergen or allergy.
Term | allergenShellfish |
URL | https://w3id.org/foodallergen#allergenShellfish |
Expected Value | boolean |
Indicates a Soy food allergen or allergy.
Term | allergenSoy |
URL | https://w3id.org/foodallergen#allergenSoy |
Expected Value | boolean |
Indicates a Sulphites food allergen or allergy.
Term | allergenSulphites |
URL | https://w3id.org/foodallergen#allergenSulphites |
Expected Value | boolean |
Indicates a Tree Nut food allergen or allergy.
Term | allergenTreenut |
URL | https://w3id.org/foodallergen#allergenTreenut |
Expected Value | boolean |
This section details the general privacy considerations and specific privacy implications of deploying this specification into production environments.
There are a number of security considerations that implementers should be aware of when processing data described by this specification. Ignoring or not understanding the implications of this section can result in security vulnerabilities.
While this section attempts to highlight a broad set of security considerations, it is not a complete list. Implementers are urged to seek the advice of security and cryptography professionals when implementing mission critical systems using the technology outlined in this specification.
There are a number of accessibility considerations implementers should be aware of when processing data described in this specification. As with any web standards or protocols implementation, ignoring accessibility issues makes this information unusable to a large subset of the population. It is important to follow accessibility guidelines and standards, such as [[WCAG21]], to ensure all people, regardless of ability, can make use of this data. This is especially important when establishing systems utilizing cryptography, which have historically created problems for assistive technologies.
This section details the general accessibility considerations to take into account when utilizing this data model.
There are a number of internationalization considerations implementers should be aware of when publishing data described in this specification. As with any web standards or protocols implementation, ignoring internationalization makes it difficult for data to be produced and consumed across a disparate set of languages and societies, which would limit the applicability of the specification and significantly diminish its value as a standard.
This section outlines general internationalization considerations to take into account when utilizing this data model.