Skip to content

Commit

Permalink
feat: add passwordProtection property to RelationshipTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
britsta committed Dec 16, 2024
1 parent b24714b commit a5c1f93
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _docs_integrate/data-model-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,20 @@ A RelationshipTemplate serves two purposes:
| expiresAt | `string` | {% include descr_expiresAt class="RelationshipTemplate" %} | will be encrypted before sent to the Backbone |
| maxNumberOfAllocations | `number` \| `undefined` | Can be set to limit the number of allocations of this RelationshipTemplate. A RelationshipTemplate is allocated by another Identity when it is first retrieved by it from the Backbone. After this value is reached, the Backbone rejects each request of any new Identity that wants to retrieve it. Identities that already allocated it will still be able to retrieve it. | |
| forIdentity | `string` \| `undefined` | Can be set to an enmeshed address. If set, then only the [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) with that `address` can retrieve the RelationshipTemplate from the Backbone. | |
| passwordProtection | [`PasswordProtection`](#passwordprotection) \| `undefined` | Information about whether the RelationshipTemplate is protected by a password or not. | |
| truncatedReference | `string` | {% include descr_truncatedReference class="RelationshipTemplate" %} | saved only locally |

### PasswordProtection

A [RelationshipTemplate](#relationshiptemplate) can be protected by a password to ensure that it is protected from unauthorized access.
Indeed, in order for a peer to [establish a Relationship]({% link _docs_integrate/establish-relationships.md %}) to the creator of the password protected RelationshipTemplate, it must enter the correct password when loading the RelationshipTemplate.
Whether a RelationshipTemplate is protected by a password or not is recorded within its `passwordProtection` property.

| Name | Type | Description | Remarks |
| ------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| password | `string` | The password of the RelationshipTemplate. | |
| passwordIsPin | `true` \| `undefined` | If the password of the RelationshipTemplate consists only of numbers, the value of the `passwordIsPin` property can be set to `true`. In this case, the password is interpreted as a pin and a corresponding input field is displayed in the UI of the App when the pin needs to be entered. However, if the value is `undefined`, a regular input field for entering the password is displayed regardless of whether the password could also be interpreted as a pin because it only consists of numbers. | |

## Relationship

A Relationship between two Identities is the prerequisite for them to exchange Messages. If there is no Relationship, the Backbone blocks all Messages that are tried to be sent. This ensures that you only receive Messages from Identities you know, so you are protected from any harmful Messages like spam or phishing mails.
Expand Down

0 comments on commit a5c1f93

Please sign in to comment.