Skip to content

Commit

Permalink
feat: incorporate review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
britsta committed Dec 19, 2024
1 parent 363e930 commit a7bdf0b
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions _docs_integrate/data-model-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ A Token has the following properties:
| createdAt | `string` | {% include descr_createdAt class="Token" %} | |
| expiresAt | `string` | {% include descr_expiresAt class="Token" %} | |
| 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 Token from the Backbone. |
| passwordProtection | [`object for password protection of Token`](#object-for-password-protection-of-token) \| `undefined` | Information about whether the Token is protected by a password or not. | |
| passwordProtection | [`object for password protection of Token`](#object-for-password-protection-of-token) \| `undefined` | Information about whether or not the Token is protected by a password or pin. | |
| truncatedReference | `string` | {% include descr_truncatedReference class="Token" %} | saved only locally |
| isEphemeral | `boolean` | If set to `true` the Token will not be cached in the database and only displayed once. You will not be able to fetch this Token unless you remember its truncatedReference. |

### Object for Password Protection of Token

A [Token](#token) can be protected by a password to ensure that it is protected from unauthorized access.
Indeed, in order for an Identity to [load the Token]({% link _docs_use-cases/use-case-transport-load-token-created-by-others.md %}), it must enter the correct password.
In order for an Identity to [load the Token]({% link _docs_use-cases/use-case-transport-load-token-created-by-others.md %}), it must enter the correct password.
Information about the password protection of a Token is recorded within its optional `passwordProtection` property.

| Name | Type | Description | Remarks |
Expand All @@ -93,13 +93,13 @@ 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 | [`object for password protection of RelationshipTemplate`](#object-for-password-protection-of-relationshiptemplate) \| `undefined` | Information about whether the RelationshipTemplate is protected by a password or not. | |
| passwordProtection | [`object for password protection of RelationshipTemplate`](#object-for-password-protection-of-relationshiptemplate) \| `undefined` | Information about whether or not the RelationshipTemplate is protected by a password or pin. | |
| truncatedReference | `string` | {% include descr_truncatedReference class="RelationshipTemplate" %} | saved only locally |

### Object for Password Protection of RelationshipTemplate

A [RelationshipTemplate can be protected by a password]({% link _docs_integrate/establish-relationships.md %}#password-protection-of-a-relationshiptemplate) 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]({% link _docs_use-cases/use-case-transport-load-relationshiptemplate-created-by-others.md %}).
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]({% link _docs_use-cases/use-case-transport-load-relationshiptemplate-created-by-others.md %}).
Information about the password protection of a [RelationshipTemplate](#relationshiptemplate) is recorded within its optional `passwordProtection` property.

| Name | Type | Description | Remarks |
Expand Down
4 changes: 2 additions & 2 deletions _docs_integrate/establish-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ If the RelationshipTemplate is only for creating a Relationship with a single kn
// RelationshipTemplateContent or ArbitraryRelationshipTemplateContent
...
},
"forIdentity": "<address of Identity designated for RelationshipTemplate>"
"forIdentity": "<address of Identity the RelationshipTemplate is for>"
}
```

Expand All @@ -114,7 +114,7 @@ If the RelationshipTemplate is to be protected by a password, the corresponding
}
```

To specialize the input field for password entry in the UI of the App, the value of the optional field `passwordProtection.passwordIsPin` can be set to `true` if the password consists of 4 to 16 digits.
To configure the input field for password entry in the UI of the App, the value of the optional field `passwordProtection.passwordIsPin` can be set to `true` if the password consists of 4 to 16 digits.
In this case, the password is interpreted as a pin and a corresponding input field is displayed 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 it could also be interpreted as a pin.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This can be used to fetch `Tokens` for Device Onboarding or Recovery.
## Parameters

- The `reference` that contains all information to load a Token.
- `password` to enter the password if the Token is protected by a password via its `passwordProtection` property.
- The `password` if the Token is protected by a password via its `passwordProtection` property.

## On Success

Expand All @@ -58,5 +58,5 @@ This can be used to fetch `Tokens` for Device Onboarding or Recovery.
## On Failure

- There is no `Token` that matches the `reference`.
- The Token is personalized to an [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) via the property `forIdentity` of the Token.
- The Token is personalized for another [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) via the property `forIdentity` of the Token.
- No `password` or an incorrect `password` was entered in case of a password protected Token.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ required_by:

{% include properties_list.html %}

This use case retrieves the [Token]({% link _docs_integrate/data-model-overview.md %}#token) of a Device not yet onboarded that corresponds to the given Device `id` in order to onboard the Device to the Identity.
This use case retrieves the [Token]({% link _docs_integrate/data-model-overview.md %}#token) of a not yet onboarded Device that corresponds to the given Device `id` in order to onboard the Device to the Identity.

## Parameters

- `id` of the Device.
- `expiresAt` is the ISODateTime the Token expires at.
- `passwordProtection` can be specified as an [object for password protection of a Token]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-token). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the Token can load it from the Backbone. In addition, the optional property `passwordProtection.passwordIsPin` can be used to specialize the UI of the App in case the password is a pin.
- `passwordProtection` can be specified as an [object for password protection of a Token]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-token). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the Token can load it from the Backbone. In addition, the optional property `passwordProtection.passwordIsPin` can be used to configure the UI of the App in case the password is a pin.

## On Success

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ A [RelationshipTemplate]({% link _docs_integrate/data-model-overview.md %}#relat
- `content` describes the structure of the RelationshipTemplate. If an enmeshed App user shall receive this RelationshipTemplate, a [RelationshipTemplateContent]({% link _docs_integrate/data-model-overview.md %}#relationshiptemplatecontent) is required as structure, otherwise an [ArbitraryRelationshipTemplateContent]({% link _docs_integrate/data-model-overview.md %}#arbitraryrelationshiptemplatecontent) containing any data can be used.
- `maxNumberOfAllocations` is the number of times the RelationshipTemplate can be accessed by different Identities to initiate a Relationship. The Backbone returns an error, if one accesses a RelationshipTemplate with no allocations left. Accessing the same RelationshipTemplate with the same Identity multiple times doesn't affect the number of allocations. The allocation counts, even if the Identity does not accept the RelationshipTemplate by discarding it.
- `forIdentity` can be set to an enmeshed address. If set, only the Identity with that `address` can access the RelationshipTemplate.
- Optionally, `passwordProtection` can be specified as an [object for password protection of a RelationshipTemplate]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-relationshiptemplate). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the RelationshipTemplate can access it. In addition, the optional property `passwordProtection.passwordIsPin` can be used to specialize the UI of the App in case the password is a pin.
- `passwordProtection` can be specified as an [object for password protection of a RelationshipTemplate]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-relationshiptemplate). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the RelationshipTemplate can access it. In addition, the optional property `passwordProtection.passwordIsPin` can be used to configure the UI of the App in case the password is a pin.

## On Success

Expand Down
2 changes: 1 addition & 1 deletion _docs_use-cases/use-case-transport-create-own-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Creates a [Token]({% link _docs_integrate/data-model-overview.md %}#token) that
- `expiresAt` is the ISODateTime the Token expires at.
- `ephemeral` indicates if the Token should be ephemeral and thus not be stored and cached on the local database. This is especially useful for Tokens which are created regularly, e.g. for RelationshipTemplates and doesn't need to be stored.
- `forIdentity` can be set to an enmeshed address. If set, only the [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) with that `address` can load the Token from the Backbone.
- Optionally, `passwordProtection` can be specified as an [object for password protection of a Token]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-token). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the Token can load it from the Backbone. In addition, the optional property `passwordProtection.passwordIsPin` can be used to specialize the UI of the App in case the password is a pin.
- `passwordProtection` can be specified as an [object for password protection of a Token]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-token). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the Token can load it from the Backbone. In addition, the optional property `passwordProtection.passwordIsPin` can be used to configure the UI of the App in case the password is a pin.

## On Success

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Creates a [Token]({% link _docs_integrate/data-model-overview.md %}#token) for a
- Optionally, `expiresAt` can be specified, which describes the ISODateTime the Token expires at.
- Optionally, `ephemeral` can be specified, which indicates if the Token should be ephemeral and thus not be stored and cached on the local database. This is especially useful for Tokens which are created regularly, e.g. for [RelationshipTemplates]({% link _docs_integrate/data-model-overview.md %}#relationshiptemplate) and don't need to be stored.
- Optionally, `forIdentity` can be specified, which names the `address` of the only [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) that will be able to load the Token from the Backbone.
- Optionally, `passwordProtection` can be specified as an [object for password protection of a Token]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-token). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the Token can load it from the Backbone. In addition, the optional property `passwordProtection.passwordIsPin` can be used to specialize the UI of the App in case the password is a pin.
- Optionally, `passwordProtection` can be specified as an [object for password protection of a Token]({% link _docs_integrate/data-model-overview.md %}#object-for-password-protection-of-token). If set, only the Identities that know the password specified within the `passwordProtection.password` property of the Token can load it from the Backbone. In addition, the optional property `passwordProtection.passwordIsPin` can be used to configure the UI of the App in case the password is a pin.

## On Success

Expand Down
Loading

0 comments on commit a7bdf0b

Please sign in to comment.