test: add function for test User #0 to register a new user

This commit is contained in:
2023-01-07 23:15:39 -07:00
parent 3440f28121
commit 4e1263d041
3 changed files with 98 additions and 0 deletions

View File

@@ -20,6 +20,40 @@ npm run build
npm run lint
```
### Clear data & restart
Clear cache for localhost, then go to http://localhost:8080/start (because it'll regenerate if you start on the `/account` page).
### Test key contents
See [this page](openssl_signing_console.rst)
### Register new user on test server
New users require registration. This can be done with a claim payload like this by an existing user:
```
const vcClaim = {
"@context": "https://schema.org",
"@type": "RegisterAction",
agent: { did: identity0.did },
object: SERVICE_ID,
participant: { did: newIdentity.did },
};
```
On the test server, the user starting 0x000 has rights to register others, and the keys for that test User #0 are found in the codebase. You can invoke registration by User #0 on the `/account` page:
* Edit the `src/views/AccountViewView.vue` file and uncomment the lines referring to "test".
* Use the [Vue Devtools browser extension](https://devtools.vuejs.org/) and type this into the conosle: `$vm.ctx.testRegisterUser()`
### Create keys with alternate tools
See [this page](openssl_signing_console.rst)
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).