@affinidi/cli 2.0.0-beta.1 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +806 -661
- package/dist/commands/generate/app.d.ts +17 -0
- package/dist/commands/generate/app.js +147 -0
- package/dist/commands/generate/app.js.map +1 -0
- package/dist/commands/iam/add-principal.d.ts +11 -0
- package/dist/commands/iam/add-principal.js +63 -0
- package/dist/commands/iam/add-principal.js.map +1 -0
- package/dist/commands/iam/get-policies.d.ts +12 -0
- package/dist/commands/iam/get-policies.js +64 -0
- package/dist/commands/iam/get-policies.js.map +1 -0
- package/dist/commands/iam/list-principals.d.ts +8 -0
- package/dist/commands/iam/list-principals.js +23 -0
- package/dist/commands/iam/list-principals.js.map +1 -0
- package/dist/commands/iam/remove-principal.d.ts +14 -0
- package/dist/commands/iam/remove-principal.js +63 -0
- package/dist/commands/iam/remove-principal.js.map +1 -0
- package/dist/commands/iam/update-policies.d.ts +13 -0
- package/dist/commands/iam/update-policies.js +127 -0
- package/dist/commands/iam/update-policies.js.map +1 -0
- package/dist/commands/login/add-user-to-group.d.ts +11 -0
- package/dist/commands/login/add-user-to-group.js +39 -0
- package/dist/commands/login/add-user-to-group.js.map +1 -0
- package/dist/commands/login/create-config.d.ts +17 -0
- package/dist/commands/login/create-config.js +142 -0
- package/dist/commands/login/create-config.js.map +1 -0
- package/dist/commands/login/create-group.d.ts +10 -0
- package/dist/commands/login/create-group.js +40 -0
- package/dist/commands/login/create-group.js.map +1 -0
- package/dist/commands/login/delete-config.d.ts +11 -0
- package/dist/commands/login/delete-config.js +39 -0
- package/dist/commands/login/delete-config.js.map +1 -0
- package/dist/commands/login/delete-group.d.ts +11 -0
- package/dist/commands/login/delete-group.js +39 -0
- package/dist/commands/login/delete-group.js.map +1 -0
- package/dist/commands/login/get-config.d.ts +10 -0
- package/dist/commands/login/get-config.js +39 -0
- package/dist/commands/login/get-config.js.map +1 -0
- package/dist/commands/login/get-group.d.ts +10 -0
- package/dist/commands/login/get-group.js +39 -0
- package/dist/commands/login/get-group.js.map +1 -0
- package/dist/commands/login/list-configs.d.ts +7 -0
- package/dist/commands/login/list-configs.js +20 -0
- package/dist/commands/login/list-configs.js.map +1 -0
- package/dist/commands/login/list-groups.d.ts +7 -0
- package/dist/commands/login/list-groups.js +20 -0
- package/dist/commands/login/list-groups.js.map +1 -0
- package/dist/commands/login/list-users-in-group.d.ts +10 -0
- package/dist/commands/login/list-users-in-group.js +35 -0
- package/dist/commands/login/list-users-in-group.js.map +1 -0
- package/dist/commands/login/remove-user-from-group.d.ts +13 -0
- package/dist/commands/login/remove-user-from-group.js +40 -0
- package/dist/commands/login/remove-user-from-group.js.map +1 -0
- package/dist/commands/login/update-config.d.ts +17 -0
- package/dist/commands/login/update-config.js +123 -0
- package/dist/commands/login/update-config.js.map +1 -0
- package/dist/commands/project/create-project.d.ts +11 -0
- package/dist/commands/project/create-project.js +47 -0
- package/dist/commands/project/create-project.js.map +1 -0
- package/dist/commands/project/get-active-project.d.ts +7 -0
- package/dist/commands/project/get-active-project.js +20 -0
- package/dist/commands/project/get-active-project.js.map +1 -0
- package/dist/commands/project/list-projects.d.ts +7 -0
- package/dist/commands/project/list-projects.js +20 -0
- package/dist/commands/project/list-projects.js.map +1 -0
- package/dist/commands/project/select-project.d.ts +10 -0
- package/dist/commands/project/select-project.js +69 -0
- package/dist/commands/project/select-project.js.map +1 -0
- package/dist/commands/start.d.ts +3 -36
- package/dist/commands/start.js +19 -412
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stop.d.ts +6 -0
- package/dist/commands/stop.js +34 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/token/create-token.d.ts +13 -0
- package/dist/commands/token/create-token.js +78 -0
- package/dist/commands/token/create-token.js.map +1 -0
- package/dist/commands/token/delete-token.d.ts +11 -0
- package/dist/commands/token/delete-token.js +36 -0
- package/dist/commands/token/delete-token.js.map +1 -0
- package/dist/commands/token/get-token.d.ts +10 -0
- package/dist/commands/token/get-token.js +36 -0
- package/dist/commands/token/get-token.js.map +1 -0
- package/dist/commands/token/list-tokens.d.ts +7 -0
- package/dist/commands/token/list-tokens.js +20 -0
- package/dist/commands/token/list-tokens.js.map +1 -0
- package/dist/commands/token/update-token.d.ts +14 -0
- package/dist/commands/token/update-token.js +83 -0
- package/dist/commands/token/update-token.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +20 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/common/base-command.d.ts +29 -0
- package/dist/common/base-command.js +65 -0
- package/dist/common/base-command.js.map +1 -0
- package/dist/common/constants.d.ts +27 -0
- package/dist/common/constants.js +31 -0
- package/dist/common/constants.js.map +1 -0
- package/dist/common/error-messages.d.ts +1 -0
- package/dist/common/error-messages.js +8 -0
- package/dist/common/error-messages.js.map +1 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +8 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/prompts.d.ts +1 -0
- package/dist/common/prompts.js +21 -0
- package/dist/common/prompts.js.map +1 -0
- package/dist/common/validators.d.ts +4 -0
- package/dist/common/validators.js +15 -0
- package/dist/common/validators.js.map +1 -0
- package/dist/helpers/app.d.ts +11 -0
- package/dist/helpers/app.js +92 -0
- package/dist/helpers/app.js.map +1 -0
- package/dist/helpers/degit.d.ts +1 -0
- package/dist/helpers/degit.js +26 -0
- package/dist/helpers/degit.js.map +1 -0
- package/dist/helpers/jwk.d.ts +4 -0
- package/dist/helpers/jwk.js +29 -0
- package/dist/helpers/jwk.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/services/affinidi/auth/auth-result-page.d.ts +1 -0
- package/dist/services/affinidi/auth/auth-result-page.js +110 -0
- package/dist/services/affinidi/auth/auth-result-page.js.map +1 -0
- package/dist/services/affinidi/auth/bff-auth-provider.d.ts +26 -0
- package/dist/services/affinidi/auth/bff-auth-provider.js +124 -0
- package/dist/services/affinidi/auth/bff-auth-provider.js.map +1 -0
- package/dist/services/affinidi/auth/types.d.ts +7 -0
- package/dist/services/affinidi/auth/types.js +3 -0
- package/dist/services/affinidi/auth/types.js.map +1 -0
- package/dist/services/affinidi/bff-service.d.ts +20 -0
- package/dist/services/affinidi/bff-service.js +88 -0
- package/dist/services/affinidi/bff-service.js.map +1 -0
- package/dist/services/affinidi/errors.d.ts +3 -0
- package/dist/services/affinidi/errors.js +75 -0
- package/dist/services/affinidi/errors.js.map +1 -0
- package/dist/services/affinidi/iam/iam.api.d.ts +470 -0
- package/dist/services/affinidi/iam/iam.api.js +342 -0
- package/dist/services/affinidi/iam/iam.api.js.map +1 -0
- package/dist/services/affinidi/iam/index.d.ts +21 -0
- package/dist/services/affinidi/iam/index.js +148 -0
- package/dist/services/affinidi/iam/index.js.map +1 -0
- package/dist/services/affinidi/logger/console-logger-adapter.d.ts +12 -0
- package/dist/services/affinidi/logger/console-logger-adapter.js +56 -0
- package/dist/services/affinidi/logger/console-logger-adapter.js.map +1 -0
- package/dist/services/affinidi/logger/index.d.ts +2 -0
- package/dist/services/affinidi/logger/index.js +6 -0
- package/dist/services/affinidi/logger/index.js.map +1 -0
- package/dist/services/affinidi/logger/logger-adapter.d.ts +10 -0
- package/dist/services/affinidi/logger/logger-adapter.js +3 -0
- package/dist/services/affinidi/logger/logger-adapter.js.map +1 -0
- package/dist/services/affinidi/vp-adapter/index.d.ts +20 -0
- package/dist/services/affinidi/vp-adapter/index.js +145 -0
- package/dist/services/affinidi/vp-adapter/index.js.map +1 -0
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.d.ts +862 -0
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.js +550 -0
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.js.map +1 -0
- package/dist/services/credentials-vault.d.ts +19 -0
- package/dist/services/credentials-vault.js +33 -0
- package/dist/services/credentials-vault.js.map +1 -0
- package/dist/services/env-config.d.ts +35 -0
- package/dist/services/env-config.js +39 -0
- package/dist/services/env-config.js.map +1 -0
- package/dist/services/generator/auth0.d.ts +6 -0
- package/dist/services/generator/auth0.js +79 -0
- package/dist/services/generator/auth0.js.map +1 -0
- package/dist/services/generator/env-configurer.d.ts +1 -0
- package/dist/services/generator/env-configurer.js +22 -0
- package/dist/services/generator/env-configurer.js.map +1 -0
- package/package.json +64 -77
- package/bin/inject-secrets.js +0 -16
- package/bin/postinstall.js +0 -31
- package/dist/commands/analytics.d.ts +0 -21
- package/dist/commands/analytics.js +0 -74
- package/dist/commands/analytics.js.map +0 -1
- package/dist/commands/config/index.d.ts +0 -15
- package/dist/commands/config/index.js +0 -71
- package/dist/commands/config/index.js.map +0 -1
- package/dist/commands/config/username.d.ts +0 -17
- package/dist/commands/config/username.js +0 -87
- package/dist/commands/config/username.js.map +0 -1
- package/dist/commands/config/view.d.ts +0 -16
- package/dist/commands/config/view.js +0 -59
- package/dist/commands/config/view.js.map +0 -1
- package/dist/commands/create/project.d.ts +0 -16
- package/dist/commands/create/project.js +0 -82
- package/dist/commands/create/project.js.map +0 -1
- package/dist/commands/create/schema.d.ts +0 -18
- package/dist/commands/create/schema.js +0 -149
- package/dist/commands/create/schema.js.map +0 -1
- package/dist/commands/generate-application/index.d.ts +0 -28
- package/dist/commands/generate-application/index.js +0 -94
- package/dist/commands/generate-application/index.js.map +0 -1
- package/dist/commands/issue-vc.d.ts +0 -21
- package/dist/commands/issue-vc.js +0 -159
- package/dist/commands/issue-vc.js.map +0 -1
- package/dist/commands/list/projects.d.ts +0 -17
- package/dist/commands/list/projects.js +0 -110
- package/dist/commands/list/projects.js.map +0 -1
- package/dist/commands/list/schemas.d.ts +0 -26
- package/dist/commands/list/schemas.js +0 -164
- package/dist/commands/list/schemas.js.map +0 -1
- package/dist/commands/login/index.d.ts +0 -17
- package/dist/commands/login/index.js +0 -142
- package/dist/commands/login/index.js.map +0 -1
- package/dist/commands/logout/index.d.ts +0 -13
- package/dist/commands/logout/index.js +0 -72
- package/dist/commands/logout/index.js.map +0 -1
- package/dist/commands/rename/project.d.ts +0 -17
- package/dist/commands/rename/project.js +0 -100
- package/dist/commands/rename/project.js.map +0 -1
- package/dist/commands/show/project.d.ts +0 -16
- package/dist/commands/show/project.js +0 -121
- package/dist/commands/show/project.js.map +0 -1
- package/dist/commands/show/schema.d.ts +0 -17
- package/dist/commands/show/schema.js +0 -111
- package/dist/commands/show/schema.js.map +0 -1
- package/dist/commands/show/user.d.ts +0 -14
- package/dist/commands/show/user.js +0 -61
- package/dist/commands/show/user.js.map +0 -1
- package/dist/commands/sign-up/index.d.ts +0 -13
- package/dist/commands/sign-up/index.js +0 -83
- package/dist/commands/sign-up/index.js.map +0 -1
- package/dist/commands/use/project.d.ts +0 -15
- package/dist/commands/use/project.js +0 -103
- package/dist/commands/use/project.js.map +0 -1
- package/dist/commands/verify-vc.d.ts +0 -15
- package/dist/commands/verify-vc.js +0 -88
- package/dist/commands/verify-vc.js.map +0 -1
- package/dist/constants.d.ts +0 -44
- package/dist/constants.js +0 -78
- package/dist/constants.js.map +0 -1
- package/dist/customFlags/outputFlag.d.ts +0 -2
- package/dist/customFlags/outputFlag.js +0 -10
- package/dist/customFlags/outputFlag.js.map +0 -1
- package/dist/errors/index.d.ts +0 -37
- package/dist/errors/index.js +0 -118
- package/dist/errors/index.js.map +0 -1
- package/dist/exposedFunctions/genApp.d.ts +0 -27
- package/dist/exposedFunctions/genApp.js +0 -186
- package/dist/exposedFunctions/genApp.js.map +0 -1
- package/dist/fixtures/mock-projects.d.ts +0 -8
- package/dist/fixtures/mock-projects.js +0 -65
- package/dist/fixtures/mock-projects.js.map +0 -1
- package/dist/fixtures/mock-schemas.d.ts +0 -5
- package/dist/fixtures/mock-schemas.js +0 -47
- package/dist/fixtures/mock-schemas.js.map +0 -1
- package/dist/fixtures/mock-status.d.ts +0 -7
- package/dist/fixtures/mock-status.js +0 -88
- package/dist/fixtures/mock-status.js.map +0 -1
- package/dist/hooks/check/checkVersion.d.ts +0 -16
- package/dist/hooks/check/checkVersion.js +0 -23
- package/dist/hooks/check/checkVersion.js.map +0 -1
- package/dist/middleware/authentication.d.ts +0 -2
- package/dist/middleware/authentication.js +0 -24
- package/dist/middleware/authentication.js.map +0 -1
- package/dist/middleware/display.d.ts +0 -7
- package/dist/middleware/display.js +0 -72
- package/dist/middleware/display.js.map +0 -1
- package/dist/render/functions.d.ts +0 -30
- package/dist/render/functions.js +0 -138
- package/dist/render/functions.js.map +0 -1
- package/dist/render/texts.d.ts +0 -19
- package/dist/render/texts.js +0 -102
- package/dist/render/texts.js.map +0 -1
- package/dist/services/analytics/analytics.api.d.ts +0 -79
- package/dist/services/analytics/analytics.api.js +0 -134
- package/dist/services/analytics/analytics.api.js.map +0 -1
- package/dist/services/analytics/index.d.ts +0 -21
- package/dist/services/analytics/index.js +0 -80
- package/dist/services/analytics/index.js.map +0 -1
- package/dist/services/config/index.d.ts +0 -56
- package/dist/services/config/index.js +0 -294
- package/dist/services/config/index.js.map +0 -1
- package/dist/services/git/index.d.ts +0 -5
- package/dist/services/git/index.js +0 -32
- package/dist/services/git/index.js.map +0 -1
- package/dist/services/iam/iam.api.d.ts +0 -158
- package/dist/services/iam/iam.api.js +0 -219
- package/dist/services/iam/iam.api.js.map +0 -1
- package/dist/services/iam/index.d.ts +0 -12
- package/dist/services/iam/index.js +0 -77
- package/dist/services/iam/index.js.map +0 -1
- package/dist/services/index.d.ts +0 -7
- package/dist/services/index.js +0 -19
- package/dist/services/index.js.map +0 -1
- package/dist/services/issuance/bulkIssuance.api.d.ts +0 -23
- package/dist/services/issuance/bulkIssuance.api.js +0 -43
- package/dist/services/issuance/bulkIssuance.api.js.map +0 -1
- package/dist/services/issuance/index.d.ts +0 -14
- package/dist/services/issuance/index.js +0 -63
- package/dist/services/issuance/index.js.map +0 -1
- package/dist/services/issuance/issuance.api.d.ts +0 -226
- package/dist/services/issuance/issuance.api.js +0 -247
- package/dist/services/issuance/issuance.api.js.map +0 -1
- package/dist/services/issuance/parse.schema.url.d.ts +0 -5
- package/dist/services/issuance/parse.schema.url.js +0 -73
- package/dist/services/issuance/parse.schema.url.js.map +0 -1
- package/dist/services/schema-manager/generator/context-generator.d.ts +0 -2
- package/dist/services/schema-manager/generator/context-generator.js +0 -42
- package/dist/services/schema-manager/generator/context-generator.js.map +0 -1
- package/dist/services/schema-manager/generator/helpers.d.ts +0 -22
- package/dist/services/schema-manager/generator/helpers.js +0 -29
- package/dist/services/schema-manager/generator/helpers.js.map +0 -1
- package/dist/services/schema-manager/generator/mapping.d.ts +0 -6
- package/dist/services/schema-manager/generator/mapping.js +0 -22
- package/dist/services/schema-manager/generator/mapping.js.map +0 -1
- package/dist/services/schema-manager/generator/schema-generator.d.ts +0 -2
- package/dist/services/schema-manager/generator/schema-generator.js +0 -103
- package/dist/services/schema-manager/generator/schema-generator.js.map +0 -1
- package/dist/services/schema-manager/generator/types.d.ts +0 -87
- package/dist/services/schema-manager/generator/types.js +0 -15
- package/dist/services/schema-manager/generator/types.js.map +0 -1
- package/dist/services/schema-manager/index.d.ts +0 -29
- package/dist/services/schema-manager/index.js +0 -68
- package/dist/services/schema-manager/index.js.map +0 -1
- package/dist/services/schema-manager/schema-manager.api.d.ts +0 -279
- package/dist/services/schema-manager/schema-manager.api.js +0 -171
- package/dist/services/schema-manager/schema-manager.api.js.map +0 -1
- package/dist/services/schema-manager/schemaParser/schema-parser.d.ts +0 -5
- package/dist/services/schema-manager/schemaParser/schema-parser.js +0 -35
- package/dist/services/schema-manager/schemaParser/schema-parser.js.map +0 -1
- package/dist/services/user-management/index.d.ts +0 -38
- package/dist/services/user-management/index.js +0 -126
- package/dist/services/user-management/index.js.map +0 -1
- package/dist/services/user-management/user-management.api.d.ts +0 -110
- package/dist/services/user-management/user-management.api.js +0 -185
- package/dist/services/user-management/user-management.api.js.map +0 -1
- package/dist/services/vault/index.d.ts +0 -23
- package/dist/services/vault/index.js +0 -69
- package/dist/services/vault/index.js.map +0 -1
- package/dist/services/vault/typedVaultService.d.ts +0 -54
- package/dist/services/vault/typedVaultService.js +0 -136
- package/dist/services/vault/typedVaultService.js.map +0 -1
- package/dist/services/verification/index.d.ts +0 -9
- package/dist/services/verification/index.js +0 -32
- package/dist/services/verification/index.js.map +0 -1
- package/dist/services/verification/verifier.api.d.ts +0 -202
- package/dist/services/verification/verifier.api.js +0 -187
- package/dist/services/verification/verifier.api.js.map +0 -1
- package/dist/services/writer/index.d.ts +0 -3
- package/dist/services/writer/index.js +0 -17
- package/dist/services/writer/index.js.map +0 -1
- package/dist/user-actions/index.d.ts +0 -2
- package/dist/user-actions/index.js +0 -27
- package/dist/user-actions/index.js.map +0 -1
- package/dist/user-actions/inquirer.d.ts +0 -9
- package/dist/user-actions/inquirer.js +0 -131
- package/dist/user-actions/inquirer.js.map +0 -1
- package/dist/user-actions/prompts.d.ts +0 -20
- package/dist/user-actions/prompts.js +0 -94
- package/dist/user-actions/prompts.js.map +0 -1
- package/dist/wizard/helpers.d.ts +0 -8
- package/dist/wizard/helpers.js +0 -59
- package/dist/wizard/helpers.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,1046 +1,1191 @@
|
|
|
1
1
|
# Affinidi CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Affinidi CLI is a developer tool to easily manage your projects and integration with Affinidi services using command line. It empowers developers to use simple commands to improve developer experience when interacting with our different services.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Requirements
|
|
6
6
|
|
|
7
|
-
[
|
|
7
|
+
- [NodeJs v18 or higher](https://nodejs.org)
|
|
8
|
+
- A Chromium-based browser such as [Chrome](https://www.google.com/chrome/), [Microsoft Edge](https://www.microsoft.com/edge/download), [Opera](https://www.opera.com/) or [Brave](https://brave.com/)
|
|
9
|
+
- Install Affinidi Vault [extension](https://chrome.google.com/webstore/detail/fejpjjkbaklcdcibmkbmpanjbiihclon) in your browser
|
|
10
|
+
- To generate reference applications you will also need [git](https://git-scm.com/)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Installation
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Install the latest beta version of Affinidi CLI
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @affinidi/cli@beta
|
|
18
|
+
```
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Uninstall the Affinidi CLI
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
```bash
|
|
23
|
+
npm uninstall -g @affinidi/cli
|
|
24
|
+
```
|
|
18
25
|
|
|
26
|
+
## What can I do with Affinidi CLI?
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
Affinidi CLI is all you need to interact and consume Affinidi services. Optionally you can also use [Affinidi Portal](https://portal.affinidi.com/) or call Affinidi APIs directly.
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
creating new business models and greater trust.
|
|
30
|
+
### Set up Affinidi Login for your applications
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
becoming increasingly important for developers to better manage data privacy and portability
|
|
27
|
-
within their apps. With our tooling, you can start creating a privacy-preserving app within minutes.
|
|
32
|
+
Affinidi CLI allows you to make the necessary configurations to add [Affinidi Login](https://www.affinidi.com/product/affinidi-login) to you applications for a secure, passwordless and privacy preserving login experience.
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
Learn more about how Affinidi Login works in the [documentation site](https://docs.affinidi.com/docs/affinidi-login/how-affinidi-login-works/).
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
All of the Affinidi Login commands can be found under `affinidi login <command>`
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
#### Login Configuration
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
The first thing you will want to do is create a login configuration. Read more about login configuration parameters [here](https://docs.affinidi.com/docs/affinidi-login/login-configuration/).
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
To create a login configuration use: [`affinidi login create-config`](#affinidi-login-create-config)
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
Your login configuration will be created under your CLI's active project. Learn more about [projects](#manage-your-projects) and the CLI's [active project](#active-project) below.
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
#### User Groups
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
- create projects, to better organise and manage what you are building
|
|
46
|
-
- access your API keys
|
|
48
|
+
You may also want to create user groups for your application. They allow you to set access privileges for your users inside your application. A user's Affinidi Login ID token contains the groups the user belongs to, which can be used in your application to differentiate users and grant them access. Learn more about user groups [here](https://docs.affinidi.com/docs/affinidi-login/user-groups/).
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
To create a user group use: [`affinidi login create-group`](#affinidi-login-create-group)
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
To add users to a group use: [`affinidi login add-user-to-group`](#affinidi-login-add-user-to-group)
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
#### Generate an Affinidi Login example application
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
With Affinidi CLI you can:
|
|
56
|
+
Integrating Affinidi Login in your application is straightforward as it uses the open standards of OAuth 2.0 and OpenID Connect with the addition of Verifiable Presentation support (OID4VP). As such you can use the tools your are already familiar.
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
- verify VCs
|
|
58
|
+
We have prepared an reference application that uses Next.js, NextAuth.js and Auth0 to get you started.
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
To generate a reference application use: [`affinidi generate app`](#affinidi-generate-app)
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
The reference application has an MIT license, so feel free to use it as you please.
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
#### Journey summary
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
```bash
|
|
67
|
+
# 1. Authenticate to Affinidi
|
|
68
|
+
affinidi start
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
# 2. Create your Identity Provider application and copy it's login callback URL
|
|
71
|
+
# For Auth0 this is https://{auth0-app-domain}/login/callback
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
# 3. Create your login configuration
|
|
74
|
+
affinidi login create-config -n MyNewLoginConfig -u "https://my-fancy-project.eu.auth0.com/login/callback"
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
# 2. Create the Affinidi Login social connector on your Identity Provider application
|
|
77
|
+
# Auth0 example: https://docs.affinidi.com/labs/affinidi-login-auth0/#configure-auth0-social-connection-with-affinidi-login
|
|
73
78
|
|
|
74
|
-
#
|
|
79
|
+
# 4. Generate a reference application with your login configuration
|
|
80
|
+
affinidi generate app
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
# 5. Run the reference application
|
|
83
|
+
```
|
|
77
84
|
|
|
78
|
-
###
|
|
85
|
+
### Manage your Affinidi resources and their access
|
|
79
86
|
|
|
80
|
-
|
|
87
|
+
For you and your team, as builders, Affinidi offers comprehensive IAM solutions:
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
- [NodeJs v16 and higher](https://nodejs.org). (it's recommended to use [nvm](https://github.com/nvm-sh/nvm))
|
|
89
|
+
#### Manage your projects
|
|
84
90
|
|
|
85
|
-
|
|
91
|
+
Affinidi projects allow you to manage and isolate Affinidi resources for your solution. You can also add or remove collaborators, manage permissions, enable billing and more. Think of them as Azure Resource Groups or GCP Projects.
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
npm install -g @affinidi/cli
|
|
89
|
-
```
|
|
93
|
+
When you first login into the CLI a default project is automatically created for you.
|
|
90
94
|
|
|
91
|
-
|
|
95
|
+
All project commands can be found under `affinidi project <command>`
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
affinidi --version
|
|
95
|
-
```
|
|
97
|
+
Create a project with [`affinidi project create-project`](#affinidi-project-create-project)
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
For convenience, the CLI adds the concept of Active Project. This is the project you are currently working on. Read more about the CLI's [active project](#active-project) below.
|
|
98
100
|
|
|
99
|
-
|
|
101
|
+
#### Create Personal Access Tokens (PAT) to call Affinidi APIs
|
|
100
102
|
|
|
101
|
-
To
|
|
103
|
+
To programmatically call Affinidi APIs in your applications or in your automation you will require a Personal Access Token (PAT). Think of Personal Access Tokens as machine users that can perform operations on your behalf. PATs live outside of projects, meaning that they can be granted access to multiple projects.
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
2. create a project, or activate a project if you already created one
|
|
105
|
+
PATs use asymmetric keys where you are responsible of creating and maintaining the key pair.
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
Please read about more about how PAT authentication works and how you can create the keys [here](https://docs.affinidi.com/dev-tools/affinidi-cli/manage-token/#how-does-pat-authentication-works).
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
All PAT commands can be found under `affinidi token <command>`
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
Create a PAT with [`affinidi token create-token`](#affinidi-token-create-token)
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
affinidi sign-up
|
|
114
|
-
```
|
|
113
|
+
#### Assign users and PATs to your projects and grant them permissions (IAM)
|
|
115
114
|
|
|
116
|
-
|
|
115
|
+
You can grant access to your project resources to other users or to your PATs. To do so you need to add them to your project and set their policies.
|
|
117
116
|
|
|
118
|
-
|
|
119
|
-
affinidi login
|
|
120
|
-
```
|
|
117
|
+
These IAM commands work under a project, so make sure to set the desired [active project](#active-project) before running them.
|
|
121
118
|
|
|
122
|
-
|
|
123
|
-
[`sign-up`](#affinidi-sign-up)
|
|
124
|
-
[`login`](#affinidi-login)
|
|
119
|
+
All IAM commands can be found under `affinidi iam <command>`
|
|
125
120
|
|
|
126
|
-
|
|
121
|
+
1. Add a user or a PAT to the project with [`affinidi iam add-principal`](#affinidi-iam-add-principal) - _Principals are either users or PATs (machine users)_
|
|
127
122
|
|
|
128
|
-
|
|
123
|
+
2. Set the principal's access policies with [`affinidi iam update-policies`](#affinidi-iam-update-policies) - _Read more about policies [here](https://docs.affinidi.com/dev-tools/affinidi-cli/manage-iam/#defining-a-policy)_
|
|
129
124
|
|
|
130
|
-
|
|
131
|
-
affinidi create project
|
|
132
|
-
```
|
|
125
|
+
#### Journey summary
|
|
133
126
|
|
|
134
|
-
|
|
127
|
+
```bash
|
|
128
|
+
# 1. Authenticate to Affinidi
|
|
129
|
+
affinidi start
|
|
135
130
|
|
|
136
|
-
|
|
137
|
-
affinidi
|
|
138
|
-
```
|
|
131
|
+
# 2. Create a new project
|
|
132
|
+
affinidi project create-project -n MyNewProject
|
|
139
133
|
|
|
140
|
-
|
|
134
|
+
# 3. Set as CLI's active project
|
|
135
|
+
affinidi project select-project
|
|
141
136
|
|
|
142
|
-
|
|
143
|
-
affinidi
|
|
137
|
+
# 4. Create a PAT
|
|
138
|
+
affinidi token create-token -n MyNewToken -k MyKeyID -f publicKey.pem
|
|
139
|
+
|
|
140
|
+
# 5. Add the user or machine_user (PAT) to the project
|
|
141
|
+
affinidi iam add-principal --principal-id <uuid> --principal-type machine_user
|
|
142
|
+
|
|
143
|
+
# 6. Set the principal policies
|
|
144
|
+
affinidi iam update-policies --principal-id <uuid> --principal-type machine_user --file policies.json
|
|
145
|
+
|
|
146
|
+
# 7. Use PAT's private key to get a JWT and call Affinidi Services
|
|
144
147
|
```
|
|
145
148
|
|
|
146
|
-
|
|
147
|
-
[`create`](#affinidi-create)
|
|
148
|
-
[`use`](#affinidi-use)
|
|
149
|
+
## How do I use Affinidi CLI?
|
|
149
150
|
|
|
150
|
-
|
|
151
|
+
The first thing you will want to do in the CLI to access most features is to authenticate to Affinidi.
|
|
151
152
|
|
|
152
|
-
|
|
153
|
+
### Authenticating to Affinidi
|
|
153
154
|
|
|
154
|
-
|
|
155
|
+
Authenticating as a builder is also done with Affinidi Login, which requires you to have the Affinidi Vault extension.
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
$ affinidi create schema [schemaName] --description=<value> --source=<value>
|
|
158
|
-
```
|
|
157
|
+
Please install the [extension](https://chrome.google.com/webstore/detail/fejpjjkbaklcdcibmkbmpanjbiihclon), open the extension popup and follow the registration instructions. You can find a user guide to set up your Affinidi Vault [here](https://docs.affinidi.com/docs/get-started/#setup-affinidi-vault).
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
Once you have registered, authenticate in the CLI with:
|
|
161
160
|
|
|
162
|
-
```
|
|
163
|
-
|
|
161
|
+
```bash
|
|
162
|
+
affinidi start
|
|
164
163
|
```
|
|
165
164
|
|
|
166
|
-
|
|
165
|
+
### Understanding commands
|
|
167
166
|
|
|
168
|
-
|
|
169
|
-
Full reference for each command can be found here:
|
|
170
|
-
[`create`](#affinidi-create)
|
|
171
|
-
[`list`](#affinidi-list)
|
|
167
|
+
Commands in Affinidi CLI have the following structure:
|
|
172
168
|
|
|
173
|
-
|
|
169
|
+
```bash
|
|
170
|
+
affinidi <topic> <command> [flags]
|
|
171
|
+
```
|
|
174
172
|
|
|
175
|
-
|
|
173
|
+
1. All commands starts with the keyword `affinidi`
|
|
174
|
+
2. Topics typically correspond to Affinidi services or domain
|
|
175
|
+
3. Commands corresponds to the actions to perform
|
|
176
|
+
4. Flags are a way to provide the parameters required by the command
|
|
176
177
|
|
|
177
|
-
|
|
178
|
+
### Available commands
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
$ affinidi issue-vc [EMAIL] --schema=<value> --data <value>
|
|
181
|
-
```
|
|
180
|
+
In the [All Commands](#all-commands) section below you can find all of the CLI commands, with their help information, which includes usage, descriptions, flags and examples.
|
|
182
181
|
|
|
183
|
-
|
|
182
|
+
#### Useful commands:
|
|
184
183
|
|
|
185
|
-
|
|
184
|
+
[`affinidi start`](#affinidi-start) Log in to Affinidi
|
|
186
185
|
|
|
187
|
-
|
|
188
|
-
$ affinidi verify-vc --data=<value>
|
|
189
|
-
```
|
|
186
|
+
[`affinidi stop`](#affinidi-stop) Log out of Affinidi
|
|
190
187
|
|
|
191
|
-
|
|
192
|
-
[issue-vc](#affinidi-issue-vc)
|
|
193
|
-
[verify-vc](#affinidi-verify-vc)
|
|
188
|
+
[`affinidi whoami`](#affinidi-whoami) - Show the current signed in user identifiers
|
|
194
189
|
|
|
195
|
-
|
|
190
|
+
[`affinidi help`](#affinidi-help-commands) - Print the help information of a topic or command
|
|
196
191
|
|
|
197
|
-
|
|
192
|
+
[`affinidi search`](#affinidi-search) - Search and navigate through available commands
|
|
198
193
|
|
|
199
|
-
|
|
200
|
-
$ affinidi generate-application --use-case=u ticketing
|
|
201
|
-
```
|
|
194
|
+
[`affinidi commands`](#affinidi-commands) - List all available commands
|
|
202
195
|
|
|
203
|
-
|
|
196
|
+
[`affinidi generate app`](#affinidi-generate-app) Clones and configures a reference application
|
|
204
197
|
|
|
205
|
-
|
|
206
|
-
$ affinidi generate-application --name=<value> --use-case=ticketing
|
|
207
|
-
```
|
|
198
|
+
[`affinidi autocomplete`](#affinidi-autocomplete-shell) - Print the instructions to set up command autocomplete
|
|
208
199
|
|
|
209
|
-
|
|
200
|
+
`affinidi --version` - Show the current version of the Affinidi CLI installed on your machine
|
|
210
201
|
|
|
211
|
-
|
|
202
|
+
### Help
|
|
212
203
|
|
|
213
|
-
|
|
204
|
+
All commands and topics have a help document with usage, descriptions, flags and examples.
|
|
214
205
|
|
|
215
|
-
|
|
206
|
+
View it with the help flag: `affinidi login create-config --help`
|
|
216
207
|
|
|
217
|
-
|
|
208
|
+
With the help root command: `affinidi help login create-config`
|
|
218
209
|
|
|
219
|
-
|
|
210
|
+
Or by searching and selecting a command: `affinidi search`
|
|
220
211
|
|
|
221
|
-
|
|
212
|
+
### Flags
|
|
222
213
|
|
|
223
|
-
|
|
214
|
+
All commands have some global flags at their disposal.
|
|
224
215
|
|
|
225
|
-
|
|
226
|
-
$ affinidi analytics [true | false]
|
|
227
|
-
```
|
|
216
|
+
`--help` Prints the command's help information.
|
|
228
217
|
|
|
229
|
-
|
|
218
|
+
`--json` Enforce printing the output in json format. Useful for programmatic usage of CLI.
|
|
230
219
|
|
|
231
|
-
|
|
232
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view of the chosen project's details
|
|
233
|
-
```
|
|
220
|
+
`--no-color` Disables color in the output. Useful if you have trouble distinguishing colors.
|
|
234
221
|
|
|
235
|
-
|
|
222
|
+
`--no-input` Disables all the interactive prompts. Useful for automation anc ci.
|
|
236
223
|
|
|
237
|
-
|
|
238
|
-
|
|
224
|
+
You can input flags in multiple ways. All of the following will work:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
affinidi login create-config --file="config.json"
|
|
228
|
+
affinidi login create-config --file "config.json"
|
|
229
|
+
affinidi login create-config --file=config.json
|
|
230
|
+
affinidi login create-config --file config.json
|
|
231
|
+
affinidi login create-config -f "config.json"
|
|
232
|
+
affinidi login create-config -f="config.json"
|
|
233
|
+
affinidi login create-config -f"config.json"
|
|
234
|
+
affinidi login create-config -f config.json
|
|
235
|
+
affinidi login create-config -f=config.json
|
|
236
|
+
affinidi login create-config -fconfig.json
|
|
239
237
|
```
|
|
240
238
|
|
|
241
|
-
|
|
239
|
+
### Active Project
|
|
242
240
|
|
|
243
|
-
|
|
244
|
-
$ affinidi analytics --help
|
|
245
|
-
```
|
|
241
|
+
Affinidi CLI introduces a local concept of "Active Project" for convenience. Commands under the `login` and `iam` topics perform actions under a particular project. In order to not have to ask for the project and create the necessary credentials each time you call one of these commands, we ask you to define the CLI's working project once.
|
|
246
242
|
|
|
247
|
-
|
|
243
|
+
To check what is the current active project use the command [`affinidi project get-active-project`](#affinidi-project-get-active-project)
|
|
248
244
|
|
|
249
|
-
|
|
245
|
+
To switch the active project use the command [`affinidi project select-project`](#affinidi-project-select-project)
|
|
250
246
|
|
|
251
|
-
|
|
247
|
+
When you authenticate to Affinidi, the first project is set as your active one by default. You can specify which project you want to be active with a flag `affinidi start --project-id <uuid>`
|
|
252
248
|
|
|
253
|
-
|
|
254
|
-
$ affinidi autocomplete [SHELL] [FLAGS]
|
|
255
|
-
```
|
|
249
|
+
### Session and configuration files
|
|
256
250
|
|
|
257
|
-
|
|
251
|
+
When you authenticate to Affinidi with `affinidi start` the CLI will create a folder with two files in your home directory.
|
|
258
252
|
|
|
259
|
-
|
|
260
|
-
SHELL Shell type
|
|
261
|
-
```
|
|
253
|
+
`~/.affinidi/oAuthCred.json` - Stores your current session credentials. Keep it secret as this allows you to call Affinidi services.
|
|
262
254
|
|
|
263
|
-
|
|
255
|
+
`~/.affinidi/config-v2.json` - Stores user's CLI configurations (currently none)
|
|
264
256
|
|
|
265
|
-
|
|
266
|
-
-r, --refresh-cache Refresh cache (ignores displaying instructions)
|
|
267
|
-
```
|
|
257
|
+
When you run `affinidi stop` your session information is deleted.
|
|
268
258
|
|
|
269
|
-
|
|
259
|
+
## Support & Feedback
|
|
270
260
|
|
|
271
|
-
|
|
272
|
-
$ affinidi autocomplete
|
|
261
|
+
If you face any issue or have some suggestion for us please don't hesitate to create a ticket [here](https://share.hsforms.com/1i-4HKZRXSsmENzXtPdIG4g8oa2v).
|
|
273
262
|
|
|
274
|
-
|
|
263
|
+
If you have a technical issue with the CLI's codebase, you can also [create an issue](https://github.com/affinidi/affinidi-cli/issues) directly in GitHub.
|
|
275
264
|
|
|
276
|
-
|
|
265
|
+
## FAQ
|
|
277
266
|
|
|
278
|
-
|
|
279
|
-
```
|
|
267
|
+
### A note from Affinidi
|
|
280
268
|
|
|
281
|
-
|
|
269
|
+
Affinidi CLI is currently in the open beta phase and we are refining our product every day. The Affinidi CLI may be incomplete and may contain errors – they may be unstable and may cause a loss of functionality and data. Use of the Affinidi CLI will be at your own risk. As our engineers seek to improve our platform, we would not have the resources to provide any maintenance or tech support at this time. Please bear with us as we continue to improve the platform.
|
|
282
270
|
|
|
283
|
-
|
|
284
|
-
$ affinidi autocomplete --help
|
|
285
|
-
```
|
|
271
|
+
### What can I develop?
|
|
286
272
|
|
|
287
|
-
|
|
273
|
+
You are only limited by your imagination! Affinidi CLI is a toolbox with which you can build software applications for personal or commercial use.
|
|
288
274
|
|
|
289
|
-
|
|
275
|
+
### Is there anything I should not develop?
|
|
290
276
|
|
|
291
|
-
-
|
|
292
|
-
- Saved Username
|
|
277
|
+
We only provide the tools - how you use them is largely up to you. We have no control over what you develop with our tools - but please use our tools responsibly!
|
|
293
278
|
|
|
294
|
-
|
|
279
|
+
We hope that you would not develop anything that contravenes any applicable laws or regulations. Your projects should also not infringe on Affinidi’s or any third party’s intellectual property (for instance, misusing other parties’ data, code, logos, etc).
|
|
295
280
|
|
|
296
|
-
|
|
297
|
-
$ affinidi config SUBCOMMAND [ARGS]
|
|
298
|
-
```
|
|
281
|
+
### What responsibilities do I have to my end-users?
|
|
299
282
|
|
|
300
|
-
|
|
283
|
+
Please ensure that you have in place your own terms and conditions, privacy policies, and other safeguards to ensure that the projects you build are secure for your end users.
|
|
301
284
|
|
|
302
|
-
|
|
303
|
-
view Configures the output view format
|
|
285
|
+
If you are processing personal data, please protect the privacy and other legal rights of your end-users and store their personal or sensitive information securely.
|
|
304
286
|
|
|
305
|
-
|
|
306
|
-
```
|
|
287
|
+
Some of our components would also require you to incorporate our end-user notices into your terms and conditions.
|
|
307
288
|
|
|
308
|
-
|
|
289
|
+
### Is Affinidi CLI free for use?
|
|
309
290
|
|
|
310
|
-
|
|
311
|
-
-u, --unset-all Remove username from config
|
|
312
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view
|
|
313
|
-
```
|
|
291
|
+
Affinidi CLI is free during the open beta phase, so come onboard and experiment with our tools and see what you can build! We may bill for certain components in the future, but we will inform you beforehand.
|
|
314
292
|
|
|
315
|
-
|
|
293
|
+
### Is there any limit or cap to my usage of the Affinidi CLI?
|
|
316
294
|
|
|
317
|
-
|
|
318
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view
|
|
319
|
-
```
|
|
295
|
+
We may from time to time impose limits on your use of the Affinidi CLI, such as limiting the number of API requests that you may make in a given duration. This is to ensure the smooth operation of the Affinidi CLI so that you and all our other users can have a pleasant experience as we continue to scale and improve the Affinidi CLI.
|
|
320
296
|
|
|
321
|
-
|
|
297
|
+
### Do I need to provide you with anything?
|
|
322
298
|
|
|
323
|
-
|
|
324
|
-
affinidi config --unset-all
|
|
299
|
+
From time to time, we may request certain information from you to ensure that you are complying with the [Terms and Conditions](https://www.affinidi.com/terms-conditions).
|
|
325
300
|
|
|
326
|
-
|
|
301
|
+
### Can I share my developer’s account with others?
|
|
327
302
|
|
|
328
|
-
|
|
329
|
-
|
|
303
|
+
When you create a developer’s account with us, we will issue you your private login credentials. Please do not share this with anyone else, as you would be responsible for activities that happen under your account. If you have friends who are interested, ask them to sign up – let's build together!
|
|
304
|
+
|
|
305
|
+
### Telemetry
|
|
330
306
|
|
|
331
|
-
|
|
307
|
+
Affinidi collects usage data to improve our products and services. For information on what data we collect and how we use your data, please refer to our [Privacy Notice](https://www.affinidi.com/privacy-notice).
|
|
308
|
+
|
|
309
|
+
_Disclaimer:
|
|
310
|
+
Please note that this FAQ is provided for informational purposes only and is not to be considered a legal document. For the legal terms and conditions governing your use of the Affinidi CLI, please refer to our [Terms and Conditions](https://www.affinidi.com/terms-conditions)._
|
|
311
|
+
|
|
312
|
+
## All commands
|
|
313
|
+
|
|
314
|
+
<!-- commands -->
|
|
315
|
+
* [`affinidi autocomplete [SHELL]`](#affinidi-autocomplete-shell)
|
|
316
|
+
* [`affinidi commands`](#affinidi-commands)
|
|
317
|
+
* [`affinidi generate app`](#affinidi-generate-app)
|
|
318
|
+
* [`affinidi help [COMMANDS]`](#affinidi-help-commands)
|
|
319
|
+
* [`affinidi iam add-principal`](#affinidi-iam-add-principal)
|
|
320
|
+
* [`affinidi iam get-policies`](#affinidi-iam-get-policies)
|
|
321
|
+
* [`affinidi iam list-principals`](#affinidi-iam-list-principals)
|
|
322
|
+
* [`affinidi iam remove-principal`](#affinidi-iam-remove-principal)
|
|
323
|
+
* [`affinidi iam update-policies`](#affinidi-iam-update-policies)
|
|
324
|
+
* [`affinidi login add-user-to-group`](#affinidi-login-add-user-to-group)
|
|
325
|
+
* [`affinidi login create-config`](#affinidi-login-create-config)
|
|
326
|
+
* [`affinidi login create-group`](#affinidi-login-create-group)
|
|
327
|
+
* [`affinidi login delete-config`](#affinidi-login-delete-config)
|
|
328
|
+
* [`affinidi login delete-group`](#affinidi-login-delete-group)
|
|
329
|
+
* [`affinidi login get-config`](#affinidi-login-get-config)
|
|
330
|
+
* [`affinidi login get-group`](#affinidi-login-get-group)
|
|
331
|
+
* [`affinidi login list-configs`](#affinidi-login-list-configs)
|
|
332
|
+
* [`affinidi login list-groups`](#affinidi-login-list-groups)
|
|
333
|
+
* [`affinidi login list-users-in-group`](#affinidi-login-list-users-in-group)
|
|
334
|
+
* [`affinidi login remove-user-from-group`](#affinidi-login-remove-user-from-group)
|
|
335
|
+
* [`affinidi login update-config`](#affinidi-login-update-config)
|
|
336
|
+
* [`affinidi project create-project`](#affinidi-project-create-project)
|
|
337
|
+
* [`affinidi project get-active-project`](#affinidi-project-get-active-project)
|
|
338
|
+
* [`affinidi project list-projects`](#affinidi-project-list-projects)
|
|
339
|
+
* [`affinidi project select-project`](#affinidi-project-select-project)
|
|
340
|
+
* [`affinidi search`](#affinidi-search)
|
|
341
|
+
* [`affinidi start`](#affinidi-start)
|
|
342
|
+
* [`affinidi stop`](#affinidi-stop)
|
|
343
|
+
* [`affinidi token create-token`](#affinidi-token-create-token)
|
|
344
|
+
* [`affinidi token delete-token`](#affinidi-token-delete-token)
|
|
345
|
+
* [`affinidi token get-token`](#affinidi-token-get-token)
|
|
346
|
+
* [`affinidi token list-tokens`](#affinidi-token-list-tokens)
|
|
347
|
+
* [`affinidi token update-token`](#affinidi-token-update-token)
|
|
348
|
+
* [`affinidi whoami`](#affinidi-whoami)
|
|
349
|
+
|
|
350
|
+
## `affinidi autocomplete [SHELL]`
|
|
351
|
+
|
|
352
|
+
display autocomplete installation instructions
|
|
332
353
|
|
|
333
354
|
```
|
|
334
|
-
|
|
335
|
-
|
|
355
|
+
USAGE
|
|
356
|
+
$ affinidi autocomplete [SHELL] [-r]
|
|
336
357
|
|
|
337
|
-
|
|
358
|
+
ARGUMENTS
|
|
359
|
+
SHELL (zsh|bash|powershell) Shell type
|
|
338
360
|
|
|
339
|
-
|
|
361
|
+
FLAGS
|
|
362
|
+
-r, --refresh-cache Refresh cache (ignores displaying instructions)
|
|
340
363
|
|
|
341
|
-
|
|
342
|
-
|
|
364
|
+
DESCRIPTION
|
|
365
|
+
display autocomplete installation instructions
|
|
343
366
|
|
|
344
|
-
|
|
367
|
+
EXAMPLES
|
|
368
|
+
$ affinidi autocomplete
|
|
345
369
|
|
|
346
|
-
|
|
347
|
-
$ affinidi create SUBCOMMAND [ARGS...] [FLAGS]
|
|
348
|
-
```
|
|
370
|
+
$ affinidi autocomplete bash
|
|
349
371
|
|
|
350
|
-
|
|
372
|
+
$ affinidi autocomplete zsh
|
|
351
373
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
374
|
+
$ affinidi autocomplete powershell
|
|
375
|
+
|
|
376
|
+
$ affinidi autocomplete --refresh-cache
|
|
355
377
|
```
|
|
356
378
|
|
|
357
|
-
|
|
379
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v2.3.6/src/commands/autocomplete/index.ts)_
|
|
358
380
|
|
|
359
|
-
|
|
360
|
-
$ affinidi create project [projectName]
|
|
361
|
-
```
|
|
381
|
+
## `affinidi commands`
|
|
362
382
|
|
|
363
|
-
|
|
383
|
+
list all the commands
|
|
364
384
|
|
|
365
385
|
```
|
|
366
|
-
|
|
367
|
-
|
|
386
|
+
USAGE
|
|
387
|
+
$ affinidi commands [--json] [-h] [--hidden] [--tree] [--columns <value> | -x] [--sort <value>] [--filter
|
|
388
|
+
<value>] [--output csv|json|yaml | | [--csv | --no-truncate]] [--no-header | ]
|
|
368
389
|
|
|
369
|
-
|
|
390
|
+
FLAGS
|
|
391
|
+
-h, --help Show CLI help.
|
|
392
|
+
-x, --extended show extra columns
|
|
393
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
394
|
+
--csv output is csv format [alias: --output=csv]
|
|
395
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
396
|
+
--hidden show hidden commands
|
|
397
|
+
--no-header hide table header from output
|
|
398
|
+
--no-truncate do not truncate output to fit screen
|
|
399
|
+
--output=<option> output in a more machine friendly format
|
|
400
|
+
<options: csv|json|yaml>
|
|
401
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
402
|
+
--tree show tree of commands
|
|
370
403
|
|
|
371
|
-
|
|
404
|
+
GLOBAL FLAGS
|
|
405
|
+
--json Format output as json.
|
|
372
406
|
|
|
373
|
-
|
|
374
|
-
|
|
407
|
+
DESCRIPTION
|
|
408
|
+
list all the commands
|
|
375
409
|
```
|
|
376
410
|
|
|
377
|
-
|
|
411
|
+
_See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/v2.2.25/src/commands/commands.ts)_
|
|
378
412
|
|
|
379
|
-
|
|
380
|
-
$ affinidi create schema [schemaName] [FLAGS]
|
|
381
|
-
```
|
|
413
|
+
## `affinidi generate app`
|
|
382
414
|
|
|
383
|
-
|
|
415
|
+
Generates a reference application that integrates Affinidi Login. Requires git
|
|
384
416
|
|
|
385
417
|
```
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
418
|
+
USAGE
|
|
419
|
+
$ affinidi generate app [--json] [--no-color] [--no-input] [-f <value>] [-a <value>] [-p <value>] [--force]
|
|
420
|
+
|
|
421
|
+
FLAGS
|
|
422
|
+
-a, --provider=<value> Authentication provider for the reference app
|
|
423
|
+
-f, --framework=<value> Framework for the reference app
|
|
424
|
+
-p, --path=<value> Relative or absolute path where reference application should be cloned into
|
|
425
|
+
--force Override destination directory if exists
|
|
426
|
+
|
|
427
|
+
GLOBAL FLAGS
|
|
428
|
+
--json Format output as json.
|
|
429
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
430
|
+
--no-input Disables all the interactive prompts
|
|
391
431
|
|
|
392
|
-
Please see [How to structure a schema](#how-to-structure-a-schema) for guidance on how to create the _source_ file.
|
|
393
432
|
EXAMPLES
|
|
433
|
+
$ affinidi generate app
|
|
394
434
|
|
|
395
|
-
|
|
396
|
-
$ affinidi create project "Example Project"
|
|
435
|
+
$ affinidi generate app -p "../my-app" -f django -a affinidi
|
|
397
436
|
|
|
398
|
-
$ affinidi
|
|
437
|
+
$ affinidi generate app --path "../my-app" --framework django --provider affinidi --force
|
|
399
438
|
```
|
|
400
439
|
|
|
401
|
-
|
|
440
|
+
## `affinidi help [COMMANDS]`
|
|
441
|
+
|
|
442
|
+
Display help for affinidi.
|
|
402
443
|
|
|
403
444
|
```
|
|
404
|
-
|
|
405
|
-
$ affinidi
|
|
406
|
-
|
|
445
|
+
USAGE
|
|
446
|
+
$ affinidi help [COMMANDS] [-n]
|
|
447
|
+
|
|
448
|
+
ARGUMENTS
|
|
449
|
+
COMMANDS Command to show help for.
|
|
450
|
+
|
|
451
|
+
FLAGS
|
|
452
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
453
|
+
|
|
454
|
+
DESCRIPTION
|
|
455
|
+
Display help for affinidi.
|
|
407
456
|
```
|
|
408
457
|
|
|
409
|
-
|
|
458
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.18/src/commands/help.ts)_
|
|
410
459
|
|
|
411
|
-
|
|
460
|
+
## `affinidi iam add-principal`
|
|
412
461
|
|
|
413
|
-
|
|
462
|
+
Adds a principal (user or token) to the active project
|
|
414
463
|
|
|
415
464
|
```
|
|
416
|
-
|
|
417
|
-
|
|
465
|
+
USAGE
|
|
466
|
+
$ affinidi iam add-principal [--json] [--no-color] [--no-input] [-i <value>] [-t token|user]
|
|
418
467
|
|
|
419
468
|
FLAGS
|
|
469
|
+
-i, --principal-id=<value> ID of the principal
|
|
470
|
+
-t, --principal-type=<option> Type of the principal
|
|
471
|
+
<options: token|user>
|
|
420
472
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
-
|
|
424
|
-
|
|
425
|
-
```
|
|
473
|
+
GLOBAL FLAGS
|
|
474
|
+
--json Format output as json.
|
|
475
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
476
|
+
--no-input Disables all the interactive prompts
|
|
426
477
|
|
|
427
|
-
|
|
478
|
+
DESCRIPTION
|
|
479
|
+
Adds a principal (user or token) to the active project
|
|
428
480
|
|
|
429
|
-
|
|
430
|
-
$ affinidi generate-application
|
|
431
|
-
```
|
|
481
|
+
To change your active project, use command affinidi project select-project
|
|
432
482
|
|
|
433
483
|
EXAMPLES
|
|
484
|
+
$ affinidi iam add-principal -i <uuid>
|
|
434
485
|
|
|
435
|
-
|
|
436
|
-
$ affinidi generate-application -n ExampleApp
|
|
486
|
+
$ affinidi iam add-principal --principal-id <uuid> --principal-type token
|
|
437
487
|
|
|
438
|
-
|
|
488
|
+
FLAG DESCRIPTIONS
|
|
489
|
+
-i, --principal-id=<value> ID of the principal
|
|
439
490
|
|
|
440
|
-
|
|
491
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
441
492
|
```
|
|
442
493
|
|
|
443
|
-
|
|
494
|
+
## `affinidi iam get-policies`
|
|
495
|
+
|
|
496
|
+
Gets the policies of a principal (user or token)
|
|
444
497
|
|
|
445
498
|
```
|
|
446
|
-
|
|
447
|
-
|
|
499
|
+
USAGE
|
|
500
|
+
$ affinidi iam get-policies [--json] [--no-color] [--no-input] [-i <value>] [-t token|user]
|
|
448
501
|
|
|
449
|
-
|
|
502
|
+
FLAGS
|
|
503
|
+
-i, --principal-id=<value> ID of the principal
|
|
504
|
+
-t, --principal-type=<option> Type of the principal
|
|
505
|
+
<options: token|user>
|
|
450
506
|
|
|
451
|
-
|
|
507
|
+
GLOBAL FLAGS
|
|
508
|
+
--json Format output as json.
|
|
509
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
510
|
+
--no-input Disables all the interactive prompts
|
|
452
511
|
|
|
453
|
-
|
|
512
|
+
DESCRIPTION
|
|
513
|
+
Gets the policies of a principal (user or token)
|
|
454
514
|
|
|
455
|
-
|
|
456
|
-
affinidi
|
|
515
|
+
Make sure the principal you are working with is part of the active project
|
|
516
|
+
Use command affinidi project select-project to change your active project
|
|
517
|
+
|
|
518
|
+
EXAMPLES
|
|
519
|
+
$ affinidi iam get-policies -i <uuid>
|
|
520
|
+
|
|
521
|
+
$ affinidi iam get-policies --principal-id <uuid> --principal-type token
|
|
522
|
+
|
|
523
|
+
FLAG DESCRIPTIONS
|
|
524
|
+
-i, --principal-id=<value> ID of the principal
|
|
525
|
+
|
|
526
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
457
527
|
```
|
|
458
528
|
|
|
459
|
-
|
|
529
|
+
## `affinidi iam list-principals`
|
|
460
530
|
|
|
461
|
-
|
|
531
|
+
Lists the principals (users and tokens) in the active project
|
|
462
532
|
|
|
533
|
+
```
|
|
463
534
|
USAGE
|
|
535
|
+
$ affinidi iam list-principals [--json] [--no-color] [--no-input]
|
|
536
|
+
|
|
537
|
+
GLOBAL FLAGS
|
|
538
|
+
--json Format output as json.
|
|
539
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
540
|
+
--no-input Disables all the interactive prompts
|
|
541
|
+
|
|
542
|
+
DESCRIPTION
|
|
543
|
+
Lists the principals (users and tokens) in the active project
|
|
464
544
|
|
|
545
|
+
To change your active project, use command affinidi project select-project
|
|
546
|
+
|
|
547
|
+
EXAMPLES
|
|
548
|
+
$ affinidi iam list-principals
|
|
465
549
|
```
|
|
466
|
-
|
|
550
|
+
|
|
551
|
+
## `affinidi iam remove-principal`
|
|
552
|
+
|
|
553
|
+
Removes a principal (user or token) from the active project
|
|
554
|
+
|
|
467
555
|
```
|
|
556
|
+
USAGE
|
|
557
|
+
$ affinidi iam remove-principal [--json] [--no-color] [--no-input] [-i <value>] [-t token|user]
|
|
468
558
|
|
|
469
559
|
FLAGS
|
|
560
|
+
-i, --principal-id=<value> ID of the principal
|
|
561
|
+
-t, --principal-type=<option> Type of the principal
|
|
562
|
+
<options: token|user>
|
|
470
563
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
-
|
|
474
|
-
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
564
|
+
GLOBAL FLAGS
|
|
565
|
+
--json Format output as json.
|
|
566
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
567
|
+
--no-input Disables all the interactive prompts
|
|
568
|
+
|
|
569
|
+
DESCRIPTION
|
|
570
|
+
Removes a principal (user or token) from the active project
|
|
571
|
+
|
|
572
|
+
To change your active project, use command affinidi project select-project
|
|
478
573
|
|
|
479
574
|
EXAMPLES
|
|
575
|
+
$ affinidi iam remove-principal -i <uuid>
|
|
480
576
|
|
|
481
|
-
|
|
482
|
-
$ affinidi issue-vc example@email.com -s "https://example.org/exampleSchema.json" -d "/exampleCredential.json"
|
|
577
|
+
$ affinidi iam remove-principal --principal-id <uuid> --principal-type token
|
|
483
578
|
|
|
484
|
-
|
|
579
|
+
FLAG DESCRIPTIONS
|
|
580
|
+
-i, --principal-id=<value> ID of the principal
|
|
485
581
|
|
|
582
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
486
583
|
```
|
|
487
584
|
|
|
488
|
-
|
|
585
|
+
## `affinidi iam update-policies`
|
|
586
|
+
|
|
587
|
+
Updates the policies of a principal (user or token) in the active project
|
|
489
588
|
|
|
490
589
|
```
|
|
491
|
-
|
|
492
|
-
|
|
590
|
+
USAGE
|
|
591
|
+
$ affinidi iam update-policies [--json] [--no-color] [--no-input] [-i <value>] [-t token|user] [-f <value>]
|
|
493
592
|
|
|
494
|
-
|
|
593
|
+
FLAGS
|
|
594
|
+
-f, --file=<value> Location of a json file containing principal policies
|
|
595
|
+
-i, --principal-id=<value> ID of the principal
|
|
596
|
+
-t, --principal-type=<option> Type of the principal
|
|
597
|
+
<options: token|user>
|
|
495
598
|
|
|
496
|
-
|
|
497
|
-
|
|
599
|
+
GLOBAL FLAGS
|
|
600
|
+
--json Format output as json.
|
|
601
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
602
|
+
--no-input Disables all the interactive prompts
|
|
498
603
|
|
|
499
|
-
|
|
500
|
-
|
|
604
|
+
DESCRIPTION
|
|
605
|
+
Updates the policies of a principal (user or token) in the active project
|
|
501
606
|
|
|
502
|
-
|
|
607
|
+
Make sure the principal you are working with is part of the active project
|
|
608
|
+
Use command affinidi project select-project to change your active project
|
|
503
609
|
|
|
504
|
-
|
|
505
|
-
$ affinidi
|
|
506
|
-
```
|
|
610
|
+
EXAMPLES
|
|
611
|
+
$ affinidi iam update-policies -i <uuid>
|
|
507
612
|
|
|
508
|
-
|
|
613
|
+
$ affinidi iam update-policies --principal-id <uuid> --principal-type token --file policies.json
|
|
509
614
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
615
|
+
FLAG DESCRIPTIONS
|
|
616
|
+
-i, --principal-id=<value> ID of the principal
|
|
617
|
+
|
|
618
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
513
619
|
```
|
|
514
620
|
|
|
515
|
-
|
|
621
|
+
## `affinidi login add-user-to-group`
|
|
622
|
+
|
|
623
|
+
Adds a user to a user group
|
|
516
624
|
|
|
517
625
|
```
|
|
518
|
-
|
|
519
|
-
-
|
|
520
|
-
-s, --skip=<value> Index into projects list from which to start the listing
|
|
521
|
-
```
|
|
626
|
+
USAGE
|
|
627
|
+
$ affinidi login add-user-to-group [--json] [--no-color] [--no-input] [--group-name <value>] [--user-id <value>]
|
|
522
628
|
|
|
523
|
-
FLAGS
|
|
629
|
+
FLAGS
|
|
630
|
+
--group-name=<value> Name of the user group
|
|
631
|
+
--user-id=<value> Id of the user. Currently the user's DID is supported.
|
|
524
632
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
-
|
|
528
|
-
-
|
|
529
|
-
-p, --public=(true|false) [default: true] To specify if you want to get public or private schemas
|
|
530
|
-
-s, --skip=<value> The number of schemas to skip
|
|
531
|
-
-x, --extended show extra columns
|
|
532
|
-
--columns=<value> only show provided columns (comma-separated)
|
|
533
|
-
--csv output is csv format [alias: --output=csv]
|
|
534
|
-
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
535
|
-
--no-header hide table header from output
|
|
536
|
-
--no-truncate do not truncate output to fit screen
|
|
537
|
-
--sort=<value> property to sort by (prepend '-' for descending)
|
|
538
|
-
```
|
|
633
|
+
GLOBAL FLAGS
|
|
634
|
+
--json Format output as json.
|
|
635
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
636
|
+
--no-input Disables all the interactive prompts
|
|
539
637
|
|
|
540
638
|
EXAMPLES
|
|
541
|
-
|
|
639
|
+
$ affinidi login add-user-to-group --group-name my_group --user-id did:key:12345
|
|
542
640
|
```
|
|
543
|
-
$ affinidi list projects
|
|
544
641
|
|
|
545
|
-
|
|
546
|
-
```
|
|
642
|
+
## `affinidi login create-config`
|
|
547
643
|
|
|
548
|
-
|
|
644
|
+
Creates a login configuration in your active project
|
|
549
645
|
|
|
550
646
|
```
|
|
551
|
-
|
|
552
|
-
$ affinidi
|
|
553
|
-
|
|
554
|
-
|
|
647
|
+
USAGE
|
|
648
|
+
$ affinidi login create-config [--json] [--no-color] [--no-input] [-f <value> | -n <value> | -u <value> |
|
|
649
|
+
--token-endpoint-auth-method client_secret_basic|client_secret_post|none | --claim-format array|map | --client-name
|
|
650
|
+
<value> | --client-origin <value> | --client-logo <value>]
|
|
555
651
|
|
|
556
|
-
|
|
652
|
+
FLAGS
|
|
653
|
+
-f, --file=<value> Location of a json file containing login configuration data
|
|
654
|
+
-n, --name=<value> Name of the login configuration
|
|
655
|
+
-u, --redirect-uris=<value> OAuth 2.0 redirect URIs, separated by space
|
|
656
|
+
--claim-format=<option> ID token claims output format. Defaults to array
|
|
657
|
+
<options: array|map>
|
|
658
|
+
--client-logo=<value> URL of a logo for the client, displayed in the consent page
|
|
659
|
+
--client-name=<value> Name of the client, displayed in the consent page
|
|
660
|
+
--client-origin=<value> Origin of the client, displayed in the consent page
|
|
661
|
+
--token-endpoint-auth-method=<option> Client authentication method for the token endpoint. Defaults to
|
|
662
|
+
client_secret_post
|
|
663
|
+
<options: client_secret_basic|client_secret_post|none>
|
|
664
|
+
|
|
665
|
+
GLOBAL FLAGS
|
|
666
|
+
--json Format output as json.
|
|
667
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
668
|
+
--no-input Disables all the interactive prompts
|
|
557
669
|
|
|
558
|
-
|
|
670
|
+
EXAMPLES
|
|
671
|
+
$ affinidi login create-config
|
|
559
672
|
|
|
560
|
-
|
|
673
|
+
$ affinidi login create-config -f loginConfig.json
|
|
561
674
|
|
|
562
|
-
|
|
563
|
-
$ affinidi login [EMAIL]
|
|
564
|
-
```
|
|
675
|
+
$ affinidi login create-config -n MyLoginConfig -u http://localhost:8080/callback
|
|
565
676
|
|
|
566
|
-
|
|
677
|
+
$ affinidi login create-config --name "My Login Config" --redirect-uris "https://my-fancy-project.eu.auth0.com/login/callback http://localhost:8080/callback" --token-endpoint-auth-method client_secret_post --claim-format array --client-name "My App Name" --client-origin http://localhost:8080 --client-logo http://localhost:8080/logo
|
|
567
678
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
```
|
|
679
|
+
FLAG DESCRIPTIONS
|
|
680
|
+
--token-endpoint-auth-method=client_secret_basic|client_secret_post|none
|
|
571
681
|
|
|
572
|
-
|
|
682
|
+
Client authentication method for the token endpoint. Defaults to client_secret_post
|
|
573
683
|
|
|
574
|
-
|
|
575
|
-
|
|
684
|
+
The options are:
|
|
685
|
+
client_secret_post: (default) Send client_id and client_secret as application/x-www-form-urlencoded in the HTTP body
|
|
686
|
+
client_secret_basic: Send client_id and client_secret as application/x-www-form-urlencoded encoded in the HTTP
|
|
687
|
+
Authorization header
|
|
688
|
+
none: For public clients (native/mobile apps) which can not have a secret
|
|
576
689
|
```
|
|
577
690
|
|
|
578
|
-
|
|
691
|
+
## `affinidi login create-group`
|
|
692
|
+
|
|
693
|
+
Create a user group in your active project
|
|
579
694
|
|
|
580
695
|
```
|
|
581
|
-
|
|
582
|
-
|
|
696
|
+
USAGE
|
|
697
|
+
$ affinidi login create-group [--json] [--no-color] [--no-input] [-n <value>]
|
|
583
698
|
|
|
584
|
-
|
|
699
|
+
FLAGS
|
|
700
|
+
-n, --name=<value> Name of the user group, that follows url-friendly pattern ^[a-z_]+$
|
|
585
701
|
|
|
586
|
-
|
|
702
|
+
GLOBAL FLAGS
|
|
703
|
+
--json Format output as json.
|
|
704
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
705
|
+
--no-input Disables all the interactive prompts
|
|
587
706
|
|
|
588
|
-
|
|
707
|
+
EXAMPLES
|
|
708
|
+
$ affinidi login create-group -n my_new_group
|
|
589
709
|
|
|
590
|
-
|
|
591
|
-
$ affinidi logout
|
|
710
|
+
$ affinidi login create-group --name my_new_group
|
|
592
711
|
```
|
|
593
712
|
|
|
594
|
-
|
|
713
|
+
## `affinidi login delete-config`
|
|
714
|
+
|
|
715
|
+
Deletes a login configuration from your active project
|
|
595
716
|
|
|
596
717
|
```
|
|
597
|
-
|
|
598
|
-
|
|
718
|
+
USAGE
|
|
719
|
+
$ affinidi login delete-config [--json] [--no-color] [--no-input] [-i <value>]
|
|
599
720
|
|
|
600
721
|
FLAGS
|
|
722
|
+
-i, --id=<value> ID of the login configuration
|
|
601
723
|
|
|
602
|
-
|
|
603
|
-
|
|
724
|
+
GLOBAL FLAGS
|
|
725
|
+
--json Format output as json.
|
|
726
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
727
|
+
--no-input Disables all the interactive prompts
|
|
728
|
+
|
|
729
|
+
EXAMPLES
|
|
730
|
+
$ affinidi login delete-config -i <value>
|
|
731
|
+
|
|
732
|
+
$ affinidi login delete-config --id <value>
|
|
604
733
|
```
|
|
605
734
|
|
|
606
|
-
|
|
735
|
+
## `affinidi login delete-group`
|
|
607
736
|
|
|
608
|
-
|
|
737
|
+
Deletes a user group from your active project
|
|
609
738
|
|
|
739
|
+
```
|
|
610
740
|
USAGE
|
|
741
|
+
$ affinidi login delete-group [--json] [--no-color] [--no-input] [-n <value>]
|
|
611
742
|
|
|
743
|
+
FLAGS
|
|
744
|
+
-n, --name=<value> Name of the user group
|
|
745
|
+
|
|
746
|
+
GLOBAL FLAGS
|
|
747
|
+
--json Format output as json.
|
|
748
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
749
|
+
--no-input Disables all the interactive prompts
|
|
750
|
+
|
|
751
|
+
EXAMPLES
|
|
752
|
+
$ affinidi login delete-group -n my_group
|
|
753
|
+
|
|
754
|
+
$ affinidi login delete-group --name my_group
|
|
612
755
|
```
|
|
613
|
-
|
|
756
|
+
|
|
757
|
+
## `affinidi login get-config`
|
|
758
|
+
|
|
759
|
+
Gets the details of a login configuration in your active project
|
|
760
|
+
|
|
614
761
|
```
|
|
762
|
+
USAGE
|
|
763
|
+
$ affinidi login get-config [--json] [--no-color] [--no-input] [-i <value>]
|
|
615
764
|
|
|
616
765
|
FLAGS
|
|
766
|
+
-i, --id=<value> ID of the login configuration
|
|
617
767
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
-
|
|
621
|
-
|
|
768
|
+
GLOBAL FLAGS
|
|
769
|
+
--json Format output as json.
|
|
770
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
771
|
+
--no-input Disables all the interactive prompts
|
|
622
772
|
|
|
623
773
|
EXAMPLES
|
|
774
|
+
$ affinidi login get-config -i <value>
|
|
624
775
|
|
|
625
|
-
|
|
626
|
-
$ affinidi rename project example-id -n "New Name"
|
|
776
|
+
$ affinidi login get-config --id <value>
|
|
627
777
|
```
|
|
628
778
|
|
|
629
|
-
|
|
779
|
+
## `affinidi login get-group`
|
|
630
780
|
|
|
631
|
-
|
|
632
|
-
$ affinidi rename project --help
|
|
633
|
-
```
|
|
781
|
+
Gets the details of a user group
|
|
634
782
|
|
|
635
|
-
|
|
783
|
+
```
|
|
784
|
+
USAGE
|
|
785
|
+
$ affinidi login get-group [--json] [--no-color] [--no-input] [-n <value>]
|
|
636
786
|
|
|
637
|
-
|
|
787
|
+
FLAGS
|
|
788
|
+
-n, --name=<value> Name of the user group
|
|
638
789
|
|
|
639
|
-
|
|
640
|
-
|
|
790
|
+
GLOBAL FLAGS
|
|
791
|
+
--json Format output as json.
|
|
792
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
793
|
+
--no-input Disables all the interactive prompts
|
|
641
794
|
|
|
642
|
-
|
|
795
|
+
EXAMPLES
|
|
796
|
+
$ affinidi login get-group -n my_group
|
|
643
797
|
|
|
644
|
-
|
|
645
|
-
$ affinidi show [SUBCOMMAND] [ARG...] [FLAGS]
|
|
798
|
+
$ affinidi login get-group --name my_group
|
|
646
799
|
```
|
|
647
800
|
|
|
648
|
-
|
|
801
|
+
## `affinidi login list-configs`
|
|
802
|
+
|
|
803
|
+
Lists login configurations in your active project
|
|
649
804
|
|
|
650
805
|
```
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
user Shows info about logged-in user
|
|
654
|
-
```
|
|
806
|
+
USAGE
|
|
807
|
+
$ affinidi login list-configs [--json] [--no-color] [--no-input]
|
|
655
808
|
|
|
656
|
-
|
|
809
|
+
GLOBAL FLAGS
|
|
810
|
+
--json Format output as json.
|
|
811
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
812
|
+
--no-input Disables all the interactive prompts
|
|
657
813
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view
|
|
814
|
+
EXAMPLES
|
|
815
|
+
$ affinidi login list-configs
|
|
661
816
|
```
|
|
662
817
|
|
|
663
|
-
|
|
818
|
+
## `affinidi login list-groups`
|
|
819
|
+
|
|
820
|
+
Lists user groups in your active project
|
|
664
821
|
|
|
665
822
|
```
|
|
666
|
-
|
|
667
|
-
|
|
823
|
+
USAGE
|
|
824
|
+
$ affinidi login list-groups [--json] [--no-color] [--no-input]
|
|
668
825
|
|
|
669
|
-
|
|
826
|
+
GLOBAL FLAGS
|
|
827
|
+
--json Format output as json.
|
|
828
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
829
|
+
--no-input Disables all the interactive prompts
|
|
670
830
|
|
|
671
|
-
|
|
672
|
-
$ affinidi
|
|
831
|
+
EXAMPLES
|
|
832
|
+
$ affinidi login list-groups
|
|
673
833
|
```
|
|
674
834
|
|
|
675
|
-
|
|
835
|
+
## `affinidi login list-users-in-group`
|
|
836
|
+
|
|
837
|
+
Use this command to list users in the user group
|
|
676
838
|
|
|
677
839
|
```
|
|
678
|
-
|
|
679
|
-
-
|
|
680
|
-
```
|
|
840
|
+
USAGE
|
|
841
|
+
$ affinidi login list-users-in-group [--json] [--no-color] [--no-input] [--group-name <value>]
|
|
681
842
|
|
|
682
|
-
|
|
843
|
+
FLAGS
|
|
844
|
+
--group-name=<value> Name of the user group
|
|
683
845
|
|
|
684
|
-
|
|
685
|
-
|
|
846
|
+
GLOBAL FLAGS
|
|
847
|
+
--json Format output as json.
|
|
848
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
849
|
+
--no-input Disables all the interactive prompts
|
|
850
|
+
|
|
851
|
+
EXAMPLES
|
|
852
|
+
$ affinidi login list-users-in-group --group-name my_group
|
|
686
853
|
```
|
|
687
854
|
|
|
688
|
-
|
|
855
|
+
## `affinidi login remove-user-from-group`
|
|
856
|
+
|
|
857
|
+
Removes a user from a user group
|
|
689
858
|
|
|
690
859
|
```
|
|
691
|
-
|
|
692
|
-
|
|
860
|
+
USAGE
|
|
861
|
+
$ affinidi login remove-user-from-group [--json] [--no-color] [--no-input] [--group-name <value>] [--user-id <value>]
|
|
693
862
|
|
|
694
|
-
|
|
863
|
+
FLAGS
|
|
864
|
+
--group-name=<value> Name of the user group
|
|
865
|
+
--user-id=<value> ID of the user
|
|
695
866
|
|
|
867
|
+
GLOBAL FLAGS
|
|
868
|
+
--json Format output as json.
|
|
869
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
870
|
+
--no-input Disables all the interactive prompts
|
|
871
|
+
|
|
872
|
+
EXAMPLES
|
|
873
|
+
$ affinidi login remove-user-from-group --group-name my_group --user-id did:key:12345
|
|
696
874
|
```
|
|
697
|
-
|
|
875
|
+
|
|
876
|
+
## `affinidi login update-config`
|
|
877
|
+
|
|
878
|
+
Updates a login configuration
|
|
879
|
+
|
|
698
880
|
```
|
|
881
|
+
USAGE
|
|
882
|
+
$ affinidi login update-config [--json] [--no-color] [--no-input] [-i <value>] [-f <value> | -n <value> | -u <value> |
|
|
883
|
+
--token-endpoint-auth-method client_secret_basic|client_secret_post|none | --client-name <value> | --client-origin
|
|
884
|
+
<value> | --client-logo <value>]
|
|
885
|
+
|
|
886
|
+
FLAGS
|
|
887
|
+
-f, --file=<value> Location of a json file containing login configuration data
|
|
888
|
+
-i, --id=<value> ID of the login configuration
|
|
889
|
+
-n, --name=<value> Name of the login configuration
|
|
890
|
+
-u, --redirect-uris=<value> OAuth 2.0 redirect URIs, separated by space
|
|
891
|
+
--client-logo=<value> URL of a logo for the client, displayed in the consent page
|
|
892
|
+
--client-name=<value> Name of the client, displayed in the consent page
|
|
893
|
+
--client-origin=<value> Origin of the client, displayed in the consent page
|
|
894
|
+
--token-endpoint-auth-method=<option> Client authentication method for the token endpoint. Defaults to
|
|
895
|
+
client_secret_post
|
|
896
|
+
<options: client_secret_basic|client_secret_post|none>
|
|
897
|
+
|
|
898
|
+
GLOBAL FLAGS
|
|
899
|
+
--json Format output as json.
|
|
900
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
901
|
+
--no-input Disables all the interactive prompts
|
|
699
902
|
|
|
700
903
|
EXAMPLES
|
|
904
|
+
$ affinidi login update-config --id <value> -f loginConfig.json
|
|
701
905
|
|
|
702
|
-
|
|
703
|
-
$ affinidi show project example-id
|
|
906
|
+
$ affinidi login update-config --id <value> -u http://localhost:8080/callback
|
|
704
907
|
|
|
705
|
-
$ affinidi
|
|
908
|
+
$ affinidi login update-config --id <value> --name "My Login Config" --redirect-uris "https://my-fancy-project.eu.auth0.com/login/callback http://localhost:8080/callback" --token-endpoint-auth-method client_secret_post --client-name "My App Name" --client-origin http://localhost:8080 --client-logo http://localhost:8080/logo
|
|
706
909
|
|
|
707
|
-
|
|
708
|
-
|
|
910
|
+
FLAG DESCRIPTIONS
|
|
911
|
+
--token-endpoint-auth-method=client_secret_basic|client_secret_post|none
|
|
709
912
|
|
|
710
|
-
|
|
913
|
+
Client authentication method for the token endpoint. Defaults to client_secret_post
|
|
711
914
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
915
|
+
The options are:
|
|
916
|
+
client_secret_post: (default) Send client_id and client_secret as application/x-www-form-urlencoded in the HTTP body
|
|
917
|
+
client_secret_basic: Send client_id and client_secret as application/x-www-form-urlencoded encoded in the HTTP
|
|
918
|
+
Authorization header
|
|
919
|
+
none: For public clients (native/mobile apps) which can not have a secret
|
|
717
920
|
```
|
|
718
921
|
|
|
719
|
-
|
|
922
|
+
## `affinidi project create-project`
|
|
720
923
|
|
|
721
|
-
|
|
924
|
+
Creates a project and sets it as the active project
|
|
722
925
|
|
|
926
|
+
```
|
|
723
927
|
USAGE
|
|
928
|
+
$ affinidi project create-project [--json] [--no-color] [--no-input] [-n <value>] [-d <value>]
|
|
724
929
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
930
|
+
FLAGS
|
|
931
|
+
-d, --description=<value> Description of the project
|
|
932
|
+
-n, --name=<value> Name of the project
|
|
728
933
|
|
|
729
|
-
|
|
934
|
+
GLOBAL FLAGS
|
|
935
|
+
--json Format output as json.
|
|
936
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
937
|
+
--no-input Disables all the interactive prompts
|
|
730
938
|
|
|
731
|
-
|
|
732
|
-
$ affinidi
|
|
939
|
+
EXAMPLES
|
|
940
|
+
$ affinidi project create-project -n MyProjectName
|
|
941
|
+
|
|
942
|
+
$ affinidi project create-project --name "My project name"
|
|
733
943
|
```
|
|
734
944
|
|
|
735
|
-
|
|
945
|
+
## `affinidi project get-active-project`
|
|
946
|
+
|
|
947
|
+
Gets the current active project
|
|
736
948
|
|
|
737
949
|
```
|
|
738
|
-
|
|
950
|
+
USAGE
|
|
951
|
+
$ affinidi project get-active-project [--json] [--no-color] [--no-input]
|
|
952
|
+
|
|
953
|
+
GLOBAL FLAGS
|
|
954
|
+
--json Format output as json.
|
|
955
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
956
|
+
--no-input Disables all the interactive prompts
|
|
957
|
+
|
|
958
|
+
EXAMPLES
|
|
959
|
+
$ affinidi project get-active-project
|
|
739
960
|
```
|
|
740
961
|
|
|
741
|
-
|
|
962
|
+
## `affinidi project list-projects`
|
|
742
963
|
|
|
743
|
-
|
|
964
|
+
Lists your projects
|
|
744
965
|
|
|
966
|
+
```
|
|
745
967
|
USAGE
|
|
968
|
+
$ affinidi project list-projects [--json] [--no-color] [--no-input]
|
|
969
|
+
|
|
970
|
+
GLOBAL FLAGS
|
|
971
|
+
--json Format output as json.
|
|
972
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
973
|
+
--no-input Disables all the interactive prompts
|
|
746
974
|
|
|
975
|
+
EXAMPLES
|
|
976
|
+
$ affinidi project list-projects
|
|
747
977
|
```
|
|
748
|
-
|
|
978
|
+
|
|
979
|
+
## `affinidi project select-project`
|
|
980
|
+
|
|
981
|
+
Sets a project as the active project
|
|
982
|
+
|
|
749
983
|
```
|
|
984
|
+
USAGE
|
|
985
|
+
$ affinidi project select-project [--json] [--no-color] [--no-input] [-i <value>]
|
|
750
986
|
|
|
751
987
|
FLAGS
|
|
988
|
+
-i, --project-id=<value> ID of the project
|
|
752
989
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
990
|
+
GLOBAL FLAGS
|
|
991
|
+
--json Format output as json.
|
|
992
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
993
|
+
--no-input Disables all the interactive prompts
|
|
756
994
|
|
|
757
995
|
EXAMPLES
|
|
996
|
+
$ affinidi project select-project
|
|
758
997
|
|
|
759
|
-
|
|
760
|
-
|
|
998
|
+
$ affinidi project select-project -i <project-id>
|
|
999
|
+
|
|
1000
|
+
$ affinidi project select-project --project-id <project-id>
|
|
761
1001
|
```
|
|
762
1002
|
|
|
763
|
-
|
|
1003
|
+
## `affinidi search`
|
|
1004
|
+
|
|
1005
|
+
Search for a command.
|
|
764
1006
|
|
|
765
1007
|
```
|
|
766
|
-
|
|
767
|
-
$ affinidi
|
|
1008
|
+
USAGE
|
|
1009
|
+
$ affinidi search
|
|
1010
|
+
|
|
1011
|
+
DESCRIPTION
|
|
1012
|
+
Search for a command.
|
|
1013
|
+
|
|
1014
|
+
Once you select a command, hit enter and it will show the help for that command.
|
|
768
1015
|
```
|
|
769
1016
|
|
|
770
|
-
|
|
1017
|
+
_See code: [@oclif/plugin-search](https://github.com/oclif/plugin-search/blob/v0.0.22/dist/commands/search.ts)_
|
|
771
1018
|
|
|
772
|
-
|
|
1019
|
+
## `affinidi start`
|
|
773
1020
|
|
|
774
|
-
|
|
1021
|
+
Log in to Affinidi
|
|
775
1022
|
|
|
776
1023
|
```
|
|
777
|
-
|
|
778
|
-
|
|
1024
|
+
USAGE
|
|
1025
|
+
$ affinidi start [--json] [--no-color] [--no-input]
|
|
779
1026
|
|
|
780
|
-
FLAGS
|
|
1027
|
+
GLOBAL FLAGS
|
|
1028
|
+
--json Format output as json.
|
|
1029
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1030
|
+
--no-input Disables all the interactive prompts
|
|
781
1031
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view
|
|
1032
|
+
EXAMPLES
|
|
1033
|
+
$ affinidi start
|
|
785
1034
|
```
|
|
786
1035
|
|
|
787
|
-
|
|
1036
|
+
_See code: [dist/commands/start.ts](https://github.com/affinidi/affinidi-cli/blob/v2.0.0-beta.10/dist/commands/start.ts)_
|
|
1037
|
+
|
|
1038
|
+
## `affinidi stop`
|
|
1039
|
+
|
|
1040
|
+
Log out from Affinidi
|
|
788
1041
|
|
|
789
1042
|
```
|
|
790
|
-
|
|
791
|
-
|
|
1043
|
+
USAGE
|
|
1044
|
+
$ affinidi stop [--json] [--no-color] [--no-input]
|
|
792
1045
|
|
|
793
|
-
|
|
1046
|
+
GLOBAL FLAGS
|
|
1047
|
+
--json Format output as json.
|
|
1048
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1049
|
+
--no-input Disables all the interactive prompts
|
|
794
1050
|
|
|
1051
|
+
EXAMPLES
|
|
1052
|
+
$ affinidi stop
|
|
795
1053
|
```
|
|
796
|
-
|
|
1054
|
+
|
|
1055
|
+
_See code: [dist/commands/stop.ts](https://github.com/affinidi/affinidi-cli/blob/v2.0.0-beta.10/dist/commands/stop.ts)_
|
|
1056
|
+
|
|
1057
|
+
## `affinidi token create-token`
|
|
1058
|
+
|
|
1059
|
+
Creates a Personal Access Token (PAT)
|
|
1060
|
+
|
|
797
1061
|
```
|
|
1062
|
+
USAGE
|
|
1063
|
+
$ affinidi token create-token [--json] [--no-color] [--no-input] [-n <value>] [-k <value>] [-f <value>] [--algorithm
|
|
1064
|
+
RS256|RS512|ES256|ES512]
|
|
798
1065
|
|
|
799
|
-
|
|
1066
|
+
FLAGS
|
|
1067
|
+
-f, --public-key-file=<value> Location of the public key PEM file
|
|
1068
|
+
-k, --key-id=<value> Identifier of the key (kid)
|
|
1069
|
+
-n, --name=<value> Name of the Personal Access Token, at least 8 chars long
|
|
1070
|
+
--algorithm=<option> [default: RS256] The specific cryptographic algorithm used with the key
|
|
1071
|
+
<options: RS256|RS512|ES256|ES512>
|
|
800
1072
|
|
|
801
|
-
|
|
1073
|
+
GLOBAL FLAGS
|
|
1074
|
+
--json Format output as json.
|
|
1075
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1076
|
+
--no-input Disables all the interactive prompts
|
|
802
1077
|
|
|
803
|
-
|
|
1078
|
+
EXAMPLES
|
|
1079
|
+
$ affinidi token create-token -n MyNewToken -k MyKeyID -f publicKey.pem
|
|
804
1080
|
|
|
805
|
-
|
|
1081
|
+
$ affinidi token create-token --name "My new token" --key-id MyKeyID --public-key-file publicKey.pem --algorithm RS256
|
|
1082
|
+
```
|
|
806
1083
|
|
|
807
|
-
|
|
1084
|
+
## `affinidi token delete-token`
|
|
808
1085
|
|
|
809
|
-
|
|
1086
|
+
Deletes a Personal Access Token (PAT)
|
|
810
1087
|
|
|
811
|
-
|
|
1088
|
+
```
|
|
1089
|
+
USAGE
|
|
1090
|
+
$ affinidi token delete-token [--json] [--no-color] [--no-input] [-i <value>]
|
|
812
1091
|
|
|
813
|
-
|
|
1092
|
+
FLAGS
|
|
1093
|
+
-i, --token-id=<value> ID of the Personal Access Token
|
|
814
1094
|
|
|
815
|
-
|
|
1095
|
+
GLOBAL FLAGS
|
|
1096
|
+
--json Format output as json.
|
|
1097
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1098
|
+
--no-input Disables all the interactive prompts
|
|
816
1099
|
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
### What is Affinidi's Schema Manager?
|
|
821
|
-
|
|
822
|
-
The Schema Manager provides URLs for two kinds of schema representations: JSON Schema and JSON-LD context.
|
|
823
|
-
Any schema can be referenced in a verifiable credential or an application by these URLs. Before creating a new schema for your verifiable credentials, it is recommended to search for an existing one, which may fit your purpose. There are both a number of standard schemas and some user-generated schemas already available in the Schema Manager, and you can search for them by “Credential schema type”. That is why it is important to provide a meaningful and expressive type for your newly created schemas.
|
|
824
|
-
|
|
825
|
-
### How to structure a schema
|
|
826
|
-
|
|
827
|
-
The JSON representation of a schema must follow this structure:
|
|
828
|
-
|
|
829
|
-
```
|
|
830
|
-
{
|
|
831
|
-
"type": "object",
|
|
832
|
-
"properties": {
|
|
833
|
-
"<propertyName>": {
|
|
834
|
-
"title": "<Property title>",
|
|
835
|
-
"type": "<Property type (see available attribites below)>",
|
|
836
|
-
"description": "<Property description>"
|
|
837
|
-
},
|
|
838
|
-
<other properties>
|
|
839
|
-
},
|
|
840
|
-
"required": [
|
|
841
|
-
<list of required properties>
|
|
842
|
-
]
|
|
843
|
-
}
|
|
844
|
-
```
|
|
845
|
-
|
|
846
|
-
And here is an example of that structure used to represent a simple form with two fields (`First Name` and `Last Name`):
|
|
847
|
-
|
|
848
|
-
```
|
|
849
|
-
{
|
|
850
|
-
"type": "object",
|
|
851
|
-
"properties": {
|
|
852
|
-
"firstName": {
|
|
853
|
-
"title": "First Name",
|
|
854
|
-
"type": "string",
|
|
855
|
-
"description": "First name of a customer"
|
|
856
|
-
},
|
|
857
|
-
"lastName": {
|
|
858
|
-
"title": "Last Name",
|
|
859
|
-
"type": "string",
|
|
860
|
-
"description": "Last name of a customer"
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
"required": [
|
|
864
|
-
"lastName"
|
|
865
|
-
]
|
|
866
|
-
}
|
|
867
|
-
```
|
|
868
|
-
|
|
869
|
-
### What attribute types are available?
|
|
870
|
-
|
|
871
|
-
- Nested attribute – a container for attributes
|
|
872
|
-
- DID – a decentralized identifier
|
|
873
|
-
- Example of VC value: "did:example:123"
|
|
874
|
-
- Text – a string value
|
|
875
|
-
- Example of VC value: "my text"
|
|
876
|
-
- URI – a link to a web resource
|
|
877
|
-
- Example of VC value: "http://ui.schema.affinidi.com/"
|
|
878
|
-
- Date – a date (ISO 8601)
|
|
879
|
-
- Example of VC value: "2011-04-01"
|
|
880
|
-
- DateTime – a specific point in time (ISO 8601)
|
|
881
|
-
- Example of VC value: "2011-05-08T19:30"
|
|
882
|
-
- Number – a numerical value
|
|
883
|
-
- Example of VC value: 123.45
|
|
884
|
-
- Boolean – a boolean value
|
|
885
|
-
- Example of VC value: true or false
|
|
886
|
-
|
|
887
|
-
Example of schema source with all the types:
|
|
888
|
-
|
|
889
|
-
```json
|
|
890
|
-
{
|
|
891
|
-
"type": "object",
|
|
892
|
-
"properties": {
|
|
893
|
-
"nestedType": {
|
|
894
|
-
"title": "nestedType",
|
|
895
|
-
"type": "object",
|
|
896
|
-
"description": "Field with nested attributes",
|
|
897
|
-
"properties": {
|
|
898
|
-
"nestedTextType": {
|
|
899
|
-
"title": "nestedTextType",
|
|
900
|
-
"type": "string",
|
|
901
|
-
"description": "Nested text field "
|
|
902
|
-
}
|
|
903
|
-
},
|
|
904
|
-
"required": []
|
|
905
|
-
},
|
|
906
|
-
"didType": {
|
|
907
|
-
"title": "didType",
|
|
908
|
-
"type": "string",
|
|
909
|
-
"format": "did",
|
|
910
|
-
"description": "DID attribute"
|
|
911
|
-
},
|
|
912
|
-
"testType": {
|
|
913
|
-
"title": "testType",
|
|
914
|
-
"type": "string",
|
|
915
|
-
"description": "Text attribute"
|
|
916
|
-
},
|
|
917
|
-
"uriType": {
|
|
918
|
-
"title": "uriType",
|
|
919
|
-
"type": "string",
|
|
920
|
-
"format": "uri",
|
|
921
|
-
"description": "URI attribute"
|
|
922
|
-
},
|
|
923
|
-
"dateType": {
|
|
924
|
-
"title": "dateType",
|
|
925
|
-
"type": "string",
|
|
926
|
-
"format": "date",
|
|
927
|
-
"description": "Date attribute"
|
|
928
|
-
},
|
|
929
|
-
"dateTimeType": {
|
|
930
|
-
"title": "dateTimeType",
|
|
931
|
-
"type": "string",
|
|
932
|
-
"format": "date-time",
|
|
933
|
-
"description": "DateTime attribute"
|
|
934
|
-
},
|
|
935
|
-
"numberType": {
|
|
936
|
-
"title": "numberType",
|
|
937
|
-
"type": "number",
|
|
938
|
-
"description": "Number attribute"
|
|
939
|
-
},
|
|
940
|
-
"booleanType": {
|
|
941
|
-
"title": "booleanType",
|
|
942
|
-
"type": "boolean",
|
|
943
|
-
"description": "Boolean attribute"
|
|
944
|
-
}
|
|
945
|
-
},
|
|
946
|
-
"required": []
|
|
947
|
-
}
|
|
948
|
-
```
|
|
949
|
-
|
|
950
|
-
### How to create or find a schema
|
|
951
|
-
|
|
952
|
-
1. You can directly create a schema in the CLI with the [`create`](#affinidi-create) command or using the [Schema Manager API](https://affinidi-schema-manager.prod.affinity-project.org/api-docs/#/Schema/CreateSchema).
|
|
953
|
-
|
|
954
|
-
2. You can list available schemas with the [`list`](#affinidi-list) command or search via the [Schema Manager API](https://affinidi-schema-manager.prod.affinity-project.org/api-docs/#/Schema/SearchSchemas) specifying `scope`, `type` or `authorDID`.
|
|
955
|
-
|
|
956
|
-
### What is the difference between a version and a revision?
|
|
957
|
-
|
|
958
|
-
Essentially, all the revisions of the single version should be compatible with each other,
|
|
959
|
-
whereas new versions could feature breaking changes, e.g. new mandatory fields. Currently, adherence to this principle is not enforced, but it is good to keep in mind when choosing between new version or revision for your forked schema.
|
|
960
|
-
|
|
961
|
-
### What does it mean to “publish as searchable schema”?
|
|
962
|
-
|
|
963
|
-
Schemas can be either public (visible and searchable for everyone ) or
|
|
964
|
-
private (unlisted, visible and searchable only for you).
|
|
965
|
-
When you “publish as searchable schema” (using flag `-p`), you make your schema public.
|
|
966
|
-
|
|
967
|
-
It is important to remember, that versions and revisions of public and private
|
|
968
|
-
(unlisted) schema are independent of each other,
|
|
969
|
-
and are maintained by the system in parallel.
|
|
970
|
-
However, you can always fork your private (unlisted) schema in order to make it public and vice versa.
|
|
971
|
-
|
|
972
|
-
### How to structure a JSON file to issue a VC:
|
|
973
|
-
|
|
974
|
-
The JSON file that is the source for the VC to be issued must follow the structure of the schema on which the VC is based. Use the properties of the schema's `credentialSubject` as the template for the new VC.
|
|
975
|
-
|
|
976
|
-
Example for [Event Eligibility Schema](https://schema.affinidi.com/EventElegibilityV1-0.json):
|
|
977
|
-
|
|
978
|
-
```
|
|
979
|
-
{
|
|
980
|
-
"date": "2031-12-11T11:15:00Z",
|
|
981
|
-
"place": "Awesome Location",
|
|
982
|
-
"eventName": "Name of Your Event",
|
|
983
|
-
"eventDescription": "Your Event Description",
|
|
984
|
-
"name": "Holder Name",
|
|
985
|
-
"email": "mail@example.com"
|
|
986
|
-
}
|
|
987
|
-
```
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
#
|
|
994
|
-
|
|
995
|
-
## Feedback & Support
|
|
996
|
-
|
|
997
|
-
Click [here](https://github.com/affinidi/affinidi-cli/issues) to create a ticket and we will get on it right away. If you are facing technical or other issues, you can reach out to us on [Discord](https://discord.com/invite/jx2hGBk5xE).
|
|
998
|
-
|
|
999
|
-
|
|
1100
|
+
EXAMPLES
|
|
1101
|
+
$ affinidi token delete-token -i <uuid>
|
|
1000
1102
|
|
|
1001
|
-
|
|
1103
|
+
$ affinidi token delete-token --token-id <uuid>
|
|
1104
|
+
```
|
|
1002
1105
|
|
|
1003
|
-
|
|
1106
|
+
## `affinidi token get-token`
|
|
1004
1107
|
|
|
1005
|
-
|
|
1108
|
+
Gets the details of a Personal Access Token (PAT)
|
|
1006
1109
|
|
|
1007
|
-
|
|
1110
|
+
```
|
|
1111
|
+
USAGE
|
|
1112
|
+
$ affinidi token get-token [--json] [--no-color] [--no-input] [-i <value>]
|
|
1008
1113
|
|
|
1009
|
-
|
|
1114
|
+
FLAGS
|
|
1115
|
+
-i, --token-id=<value> ID of the Personal Access Token
|
|
1010
1116
|
|
|
1011
|
-
|
|
1117
|
+
GLOBAL FLAGS
|
|
1118
|
+
--json Format output as json.
|
|
1119
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1120
|
+
--no-input Disables all the interactive prompts
|
|
1012
1121
|
|
|
1013
|
-
|
|
1122
|
+
EXAMPLES
|
|
1123
|
+
$ affinidi token get-token -i <uuid>
|
|
1014
1124
|
|
|
1015
|
-
|
|
1125
|
+
$ affinidi token get-token --token-id <uuid>
|
|
1126
|
+
```
|
|
1016
1127
|
|
|
1017
|
-
|
|
1128
|
+
## `affinidi token list-tokens`
|
|
1018
1129
|
|
|
1019
|
-
|
|
1130
|
+
Lists your Personal Access Tokens (PATs)
|
|
1020
1131
|
|
|
1021
|
-
|
|
1132
|
+
```
|
|
1133
|
+
USAGE
|
|
1134
|
+
$ affinidi token list-tokens [--json] [--no-color] [--no-input]
|
|
1022
1135
|
|
|
1023
|
-
|
|
1136
|
+
GLOBAL FLAGS
|
|
1137
|
+
--json Format output as json.
|
|
1138
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1139
|
+
--no-input Disables all the interactive prompts
|
|
1024
1140
|
|
|
1025
|
-
|
|
1141
|
+
EXAMPLES
|
|
1142
|
+
$ affinidi token list-tokens
|
|
1143
|
+
```
|
|
1026
1144
|
|
|
1027
|
-
|
|
1145
|
+
## `affinidi token update-token`
|
|
1028
1146
|
|
|
1029
|
-
|
|
1147
|
+
Updates a Personal Access Token (PAT)
|
|
1030
1148
|
|
|
1031
|
-
|
|
1149
|
+
```
|
|
1150
|
+
USAGE
|
|
1151
|
+
$ affinidi token update-token [--json] [--no-color] [--no-input] [-i <value>] [-n <value>] [-k <value>] [-f <value>]
|
|
1152
|
+
[--algorithm RS256|RS512|ES256|ES512]
|
|
1032
1153
|
|
|
1033
|
-
|
|
1154
|
+
FLAGS
|
|
1155
|
+
-f, --public-key-file=<value> Location of the public key PEM file
|
|
1156
|
+
-i, --token-id=<value> ID of the Personal Access Token
|
|
1157
|
+
-k, --key-id=<value> Identifier of the key (kid)
|
|
1158
|
+
-n, --name=<value> Name of the Personal Access Token, at least 8 chars long
|
|
1159
|
+
--algorithm=<option> [default: RS256] The specific cryptographic algorithm used with the key
|
|
1160
|
+
<options: RS256|RS512|ES256|ES512>
|
|
1161
|
+
|
|
1162
|
+
GLOBAL FLAGS
|
|
1163
|
+
--json Format output as json.
|
|
1164
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1165
|
+
--no-input Disables all the interactive prompts
|
|
1034
1166
|
|
|
1035
|
-
|
|
1167
|
+
EXAMPLES
|
|
1168
|
+
$ affinidi token update-token -i <uuid> -n MyNewToken -k MyKeyID -f publicKey.pem
|
|
1036
1169
|
|
|
1037
|
-
|
|
1170
|
+
$ affinidi token update-token --token-id <uuid> --name "My new token" --key-id "My key ID" --public-key-file publicKey.pem --algorithm RS256
|
|
1171
|
+
```
|
|
1038
1172
|
|
|
1039
|
-
|
|
1173
|
+
## `affinidi whoami`
|
|
1040
1174
|
|
|
1041
|
-
|
|
1175
|
+
Returns user's subject and principalId from his active session
|
|
1176
|
+
|
|
1177
|
+
```
|
|
1178
|
+
USAGE
|
|
1179
|
+
$ affinidi whoami [--json] [--no-color] [--no-input]
|
|
1180
|
+
|
|
1181
|
+
GLOBAL FLAGS
|
|
1182
|
+
--json Format output as json.
|
|
1183
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1184
|
+
--no-input Disables all the interactive prompts
|
|
1042
1185
|
|
|
1043
|
-
|
|
1186
|
+
EXAMPLES
|
|
1187
|
+
$ affinidi whoami
|
|
1188
|
+
```
|
|
1044
1189
|
|
|
1045
|
-
|
|
1046
|
-
|
|
1190
|
+
_See code: [dist/commands/whoami.ts](https://github.com/affinidi/affinidi-cli/blob/v2.0.0-beta.10/dist/commands/whoami.ts)_
|
|
1191
|
+
<!-- commandsstop -->
|