From f089ffda47b0d3b682a826c8fbcc1249a9d2a442 Mon Sep 17 00:00:00 2001 From: Joachim Van Herwegen Date: Tue, 29 Mar 2022 15:29:48 +0200 Subject: [PATCH] docs: Integrate pod seeding documentation --- documentation/README.md | 1 + documentation/seeding-pods.md | 40 +++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/documentation/README.md b/documentation/README.md index 483ae8a72..a27249f4c 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -26,6 +26,7 @@ the [changelog](https://github.com/CommunitySolidServer/CommunitySolidServer/blo * [Basic example HTTP requests](example-requests.md) * [How to use the Identity Provider](identity-provider.md) + * [How to automatically seed pods on startup](seeding-pods.md) ## What the internals look like diff --git a/documentation/seeding-pods.md b/documentation/seeding-pods.md index 2c9837c55..cdd505d94 100644 --- a/documentation/seeding-pods.md +++ b/documentation/seeding-pods.md @@ -1,20 +1,34 @@ # How to seed Accounts and Pods -If you need to seed accounts and pods, set the `--seededPodConfigJson` option to a file such as `./seeded-pod-config.json` to set your desired accounts and pods. The contents of `./seeded-pod-config.json` (or whatever file name you choose) should be a JSON array whose entries are objects which include -`podName`, `email`, and `password`. For example: + +If you need to seed accounts and pods, +the `--seededPodConfigJson` command line option can be used +with as value the path to a JSON file containing configurations for every required pod. +The file needs to contain an array of JSON objects, +with each object containing at least a `podName`, `email`, and `password` field. + +For example: ```json - [ - { - "podName": "example", - "email": "hello@example.com", - "password": "abc123" - } - ] +[ + { + "podName": "example", + "email": "hello@example.com", + "password": "abc123" + } +] ``` -You may optionally specify other parameters accepted by the `register` method of [RegistrationManager](https://github.com/solid/community-server/blob/3b353affb1f0919fdcb66172364234eb59c2e3f6/src/identity/interaction/email-password/util/RegistrationManager.ts#L173). For example: +You may optionally specify other parameters +as described in the [Identity Provider documentation](./identity-provider.md#json-api). -To use a pre-existing wedId: +For example, to use a pre-existing WebID: ```json - createWebId: false, - webId: "https://pod.inrupt.com/example/profile/card#me" +[ + { + "podName": "example", + "email": "hello@example.com", + "password": "abc123", + "webId": "https://pod.inrupt.com/example/profile/card#me", + "createWebId": false + } +] ```