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