@affinidi/cli 2.0.0-beta.3 → 2.0.0-beta.5
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 +881 -637
- package/dist/commands/generate/app.d.ts +10 -0
- package/dist/commands/generate/app.js +57 -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 +48 -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 +50 -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 +24 -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 +49 -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 +108 -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 +32 -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 +131 -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 +35 -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 +33 -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 +33 -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 +33 -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 +33 -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 +21 -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 +21 -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 +29 -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 +33 -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 +120 -0
- package/dist/commands/login/update-config.js.map +1 -0
- package/dist/commands/project/create-project.d.ts +10 -0
- package/dist/commands/project/create-project.js +35 -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 +21 -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 +21 -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 +70 -0
- package/dist/commands/project/select-project.js.map +1 -0
- package/dist/commands/start.d.ts +4 -34
- package/dist/commands/start.js +20 -409
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stop.d.ts +6 -0
- package/dist/commands/stop.js +30 -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 +21 -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/common/base-command.d.ts +28 -0
- package/dist/common/base-command.js +61 -0
- package/dist/common/base-command.js.map +1 -0
- package/dist/common/constants.d.ts +18 -0
- package/dist/common/constants.js +26 -0
- package/dist/common/constants.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/helpers/index.d.ts +2 -0
- package/dist/helpers/index.js +9 -0
- package/dist/helpers/index.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/helpers/prompt-required-flags.d.ts +1 -0
- package/dist/helpers/prompt-required-flags.js +14 -0
- package/dist/helpers/prompt-required-flags.js.map +1 -0
- package/dist/hooks/check/{checkVersion.d.ts → check-version.d.ts} +3 -2
- package/dist/hooks/check/{checkVersion.js → check-version.js} +7 -6
- package/dist/hooks/check/check-version.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/adapters/index.d.ts +1 -0
- package/dist/services/affinidi/adapters/index.js +5 -0
- package/dist/services/affinidi/adapters/index.js.map +1 -0
- package/dist/services/affinidi/adapters/logger/console-logger-adapter.d.ts +12 -0
- package/dist/services/affinidi/adapters/logger/console-logger-adapter.js +56 -0
- package/dist/services/affinidi/adapters/logger/console-logger-adapter.js.map +1 -0
- package/dist/services/affinidi/adapters/logger/index.d.ts +2 -0
- package/dist/services/affinidi/adapters/logger/index.js +6 -0
- package/dist/services/affinidi/adapters/logger/index.js.map +1 -0
- package/dist/services/affinidi/adapters/logger/logger-adapter.d.ts +10 -0
- package/dist/services/affinidi/adapters/logger/logger-adapter.js +3 -0
- package/dist/services/affinidi/adapters/logger/logger-adapter.js.map +1 -0
- package/dist/services/affinidi/auth/index.d.ts +62 -0
- package/dist/services/affinidi/auth/index.js +136 -0
- package/dist/services/affinidi/auth/index.js.map +1 -0
- package/dist/services/affinidi/auth/providers/config.d.ts +15 -0
- package/dist/services/affinidi/auth/providers/config.js +33 -0
- package/dist/services/affinidi/auth/providers/config.js.map +1 -0
- package/dist/services/affinidi/auth/providers/error-login-page.d.ts +1 -0
- package/dist/services/affinidi/auth/providers/error-login-page.js +111 -0
- package/dist/services/affinidi/auth/providers/error-login-page.js.map +1 -0
- package/dist/services/affinidi/auth/providers/index.d.ts +3 -0
- package/dist/services/affinidi/auth/providers/index.js +8 -0
- package/dist/services/affinidi/auth/providers/index.js.map +1 -0
- package/dist/services/affinidi/auth/providers/ory-pkce.d.ts +47 -0
- package/dist/services/affinidi/auth/providers/ory-pkce.js +216 -0
- package/dist/services/affinidi/auth/providers/ory-pkce.js.map +1 -0
- package/dist/services/affinidi/auth/providers/ory.d.ts +22 -0
- package/dist/services/affinidi/auth/providers/ory.js +154 -0
- package/dist/services/affinidi/auth/providers/ory.js.map +1 -0
- package/dist/services/affinidi/auth/providers/successful-login-page.d.ts +1 -0
- package/dist/services/affinidi/auth/providers/successful-login-page.js +110 -0
- package/dist/services/affinidi/auth/providers/successful-login-page.js.map +1 -0
- package/dist/services/affinidi/auth/providers/types.d.ts +10 -0
- package/dist/services/affinidi/auth/providers/types.js +3 -0
- package/dist/services/affinidi/auth/providers/types.js.map +1 -0
- package/dist/services/affinidi/auth/token.d.ts +50 -0
- package/dist/services/affinidi/auth/token.js +117 -0
- package/dist/services/affinidi/auth/token.js.map +1 -0
- package/dist/services/affinidi/config.d.ts +12 -0
- package/dist/services/affinidi/config.js +3 -0
- package/dist/services/affinidi/config.js.map +1 -0
- package/dist/services/affinidi/errors/index.d.ts +1 -0
- package/dist/services/affinidi/errors/index.js +74 -0
- package/dist/services/affinidi/errors/index.js.map +1 -0
- package/dist/services/affinidi/iam/iam.api.d.ts +446 -0
- package/dist/services/affinidi/iam/iam.api.js +423 -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 +226 -0
- package/dist/services/affinidi/iam/index.js.map +1 -0
- package/dist/services/affinidi/index.d.ts +24 -0
- package/dist/services/affinidi/index.js +52 -0
- package/dist/services/affinidi/index.js.map +1 -0
- package/dist/services/affinidi/vp-adapter/index.d.ts +20 -0
- package/dist/services/affinidi/vp-adapter/index.js +188 -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/auth0/index.d.ts +7 -0
- package/dist/services/auth0/index.js +104 -0
- package/dist/services/auth0/index.js.map +1 -0
- package/dist/services/config/index.d.ts +10 -30
- package/dist/services/config/index.js +29 -163
- package/dist/services/config/index.js.map +1 -1
- package/dist/services/index.d.ts +0 -6
- package/dist/services/index.js +1 -14
- package/dist/services/index.js.map +1 -1
- package/dist/services/urls.d.ts +3 -0
- package/dist/services/urls.js +15 -0
- package/dist/services/urls.js.map +1 -0
- package/package.json +73 -74
- package/bin/inject-secrets.js +0 -16
- package/bin/postinstall.js +0 -31
- package/dist/commands/analytics.d.ts +0 -21
- package/dist/commands/analytics.js +0 -74
- package/dist/commands/analytics.js.map +0 -1
- package/dist/commands/config/index.d.ts +0 -15
- package/dist/commands/config/index.js +0 -71
- package/dist/commands/config/index.js.map +0 -1
- package/dist/commands/config/username.d.ts +0 -17
- package/dist/commands/config/username.js +0 -87
- package/dist/commands/config/username.js.map +0 -1
- package/dist/commands/config/view.d.ts +0 -16
- package/dist/commands/config/view.js +0 -59
- package/dist/commands/config/view.js.map +0 -1
- package/dist/commands/create/project.d.ts +0 -16
- package/dist/commands/create/project.js +0 -82
- package/dist/commands/create/project.js.map +0 -1
- package/dist/commands/create/schema.d.ts +0 -18
- package/dist/commands/create/schema.js +0 -149
- package/dist/commands/create/schema.js.map +0 -1
- package/dist/commands/generate-application/index.d.ts +0 -28
- package/dist/commands/generate-application/index.js +0 -94
- package/dist/commands/generate-application/index.js.map +0 -1
- package/dist/commands/issue-vc.d.ts +0 -21
- package/dist/commands/issue-vc.js +0 -159
- package/dist/commands/issue-vc.js.map +0 -1
- package/dist/commands/list/projects.d.ts +0 -17
- package/dist/commands/list/projects.js +0 -110
- package/dist/commands/list/projects.js.map +0 -1
- package/dist/commands/list/schemas.d.ts +0 -26
- package/dist/commands/list/schemas.js +0 -164
- package/dist/commands/list/schemas.js.map +0 -1
- package/dist/commands/login/index.d.ts +0 -17
- package/dist/commands/login/index.js +0 -142
- package/dist/commands/login/index.js.map +0 -1
- package/dist/commands/logout/index.d.ts +0 -13
- package/dist/commands/logout/index.js +0 -72
- package/dist/commands/logout/index.js.map +0 -1
- package/dist/commands/rename/project.d.ts +0 -17
- package/dist/commands/rename/project.js +0 -100
- package/dist/commands/rename/project.js.map +0 -1
- package/dist/commands/show/project.d.ts +0 -16
- package/dist/commands/show/project.js +0 -121
- package/dist/commands/show/project.js.map +0 -1
- package/dist/commands/show/schema.d.ts +0 -17
- package/dist/commands/show/schema.js +0 -111
- package/dist/commands/show/schema.js.map +0 -1
- package/dist/commands/show/user.d.ts +0 -14
- package/dist/commands/show/user.js +0 -61
- package/dist/commands/show/user.js.map +0 -1
- package/dist/commands/sign-up/index.d.ts +0 -13
- package/dist/commands/sign-up/index.js +0 -83
- package/dist/commands/sign-up/index.js.map +0 -1
- package/dist/commands/use/project.d.ts +0 -15
- package/dist/commands/use/project.js +0 -103
- package/dist/commands/use/project.js.map +0 -1
- package/dist/commands/verify-vc.d.ts +0 -15
- package/dist/commands/verify-vc.js +0 -88
- package/dist/commands/verify-vc.js.map +0 -1
- package/dist/constants.d.ts +0 -44
- package/dist/constants.js +0 -78
- package/dist/constants.js.map +0 -1
- package/dist/customFlags/outputFlag.d.ts +0 -2
- package/dist/customFlags/outputFlag.js +0 -10
- package/dist/customFlags/outputFlag.js.map +0 -1
- package/dist/errors/index.d.ts +0 -37
- package/dist/errors/index.js +0 -118
- package/dist/errors/index.js.map +0 -1
- package/dist/exposedFunctions/genApp.d.ts +0 -27
- package/dist/exposedFunctions/genApp.js +0 -186
- package/dist/exposedFunctions/genApp.js.map +0 -1
- package/dist/fixtures/mock-projects.d.ts +0 -8
- package/dist/fixtures/mock-projects.js +0 -65
- package/dist/fixtures/mock-projects.js.map +0 -1
- package/dist/fixtures/mock-schemas.d.ts +0 -5
- package/dist/fixtures/mock-schemas.js +0 -47
- package/dist/fixtures/mock-schemas.js.map +0 -1
- package/dist/fixtures/mock-status.d.ts +0 -7
- package/dist/fixtures/mock-status.js +0 -88
- package/dist/fixtures/mock-status.js.map +0 -1
- package/dist/hooks/check/checkVersion.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/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/issuance/bulkIssuance.api.d.ts +0 -23
- package/dist/services/issuance/bulkIssuance.api.js +0 -43
- package/dist/services/issuance/bulkIssuance.api.js.map +0 -1
- package/dist/services/issuance/index.d.ts +0 -14
- package/dist/services/issuance/index.js +0 -63
- package/dist/services/issuance/index.js.map +0 -1
- package/dist/services/issuance/issuance.api.d.ts +0 -226
- package/dist/services/issuance/issuance.api.js +0 -247
- package/dist/services/issuance/issuance.api.js.map +0 -1
- package/dist/services/issuance/parse.schema.url.d.ts +0 -5
- package/dist/services/issuance/parse.schema.url.js +0 -73
- package/dist/services/issuance/parse.schema.url.js.map +0 -1
- package/dist/services/schema-manager/generator/context-generator.d.ts +0 -2
- package/dist/services/schema-manager/generator/context-generator.js +0 -42
- package/dist/services/schema-manager/generator/context-generator.js.map +0 -1
- package/dist/services/schema-manager/generator/helpers.d.ts +0 -22
- package/dist/services/schema-manager/generator/helpers.js +0 -29
- package/dist/services/schema-manager/generator/helpers.js.map +0 -1
- package/dist/services/schema-manager/generator/mapping.d.ts +0 -6
- package/dist/services/schema-manager/generator/mapping.js +0 -22
- package/dist/services/schema-manager/generator/mapping.js.map +0 -1
- package/dist/services/schema-manager/generator/schema-generator.d.ts +0 -2
- package/dist/services/schema-manager/generator/schema-generator.js +0 -103
- package/dist/services/schema-manager/generator/schema-generator.js.map +0 -1
- package/dist/services/schema-manager/generator/types.d.ts +0 -87
- package/dist/services/schema-manager/generator/types.js +0 -15
- package/dist/services/schema-manager/generator/types.js.map +0 -1
- package/dist/services/schema-manager/index.d.ts +0 -29
- package/dist/services/schema-manager/index.js +0 -68
- package/dist/services/schema-manager/index.js.map +0 -1
- package/dist/services/schema-manager/schema-manager.api.d.ts +0 -279
- package/dist/services/schema-manager/schema-manager.api.js +0 -171
- package/dist/services/schema-manager/schema-manager.api.js.map +0 -1
- package/dist/services/schema-manager/schemaParser/schema-parser.d.ts +0 -5
- package/dist/services/schema-manager/schemaParser/schema-parser.js +0 -35
- package/dist/services/schema-manager/schemaParser/schema-parser.js.map +0 -1
- package/dist/services/user-management/index.d.ts +0 -38
- package/dist/services/user-management/index.js +0 -126
- package/dist/services/user-management/index.js.map +0 -1
- package/dist/services/user-management/user-management.api.d.ts +0 -110
- package/dist/services/user-management/user-management.api.js +0 -185
- package/dist/services/user-management/user-management.api.js.map +0 -1
- package/dist/services/vault/index.d.ts +0 -23
- package/dist/services/vault/index.js +0 -69
- package/dist/services/vault/index.js.map +0 -1
- package/dist/services/vault/typedVaultService.d.ts +0 -54
- package/dist/services/vault/typedVaultService.js +0 -136
- package/dist/services/vault/typedVaultService.js.map +0 -1
- package/dist/services/verification/index.d.ts +0 -9
- package/dist/services/verification/index.js +0 -32
- package/dist/services/verification/index.js.map +0 -1
- package/dist/services/verification/verifier.api.d.ts +0 -202
- package/dist/services/verification/verifier.api.js +0 -187
- package/dist/services/verification/verifier.api.js.map +0 -1
- package/dist/services/writer/index.d.ts +0 -3
- package/dist/services/writer/index.js +0 -17
- package/dist/services/writer/index.js.map +0 -1
- package/dist/user-actions/index.d.ts +0 -2
- package/dist/user-actions/index.js +0 -27
- package/dist/user-actions/index.js.map +0 -1
- package/dist/user-actions/inquirer.d.ts +0 -9
- package/dist/user-actions/inquirer.js +0 -131
- package/dist/user-actions/inquirer.js.map +0 -1
- package/dist/user-actions/prompts.d.ts +0 -20
- package/dist/user-actions/prompts.js +0 -94
- package/dist/user-actions/prompts.js.map +0 -1
- package/dist/wizard/helpers.d.ts +0 -8
- package/dist/wizard/helpers.js +0 -59
- package/dist/wizard/helpers.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,1046 +1,1290 @@
|
|
|
1
1
|
# Affinidi CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Affinidi CLI is a developer tool to easily manage your projects and integration with Affinidi services using command line. It empowers developers to use simple commands to improve developer experience when interacting with our different services.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Requirements
|
|
6
6
|
|
|
7
|
-
[
|
|
7
|
+
- [NodeJs v18 or higher](https://nodejs.org)
|
|
8
|
+
- A Chromium-based browser such as [Chrome](https://www.google.com/chrome/), [Microsoft Edge](https://www.microsoft.com/edge/download), [Opera](https://www.opera.com/) or [Brave](https://brave.com/)
|
|
9
|
+
- Install Affinidi Vault [extension](https://chrome.google.com/webstore/detail/fejpjjkbaklcdcibmkbmpanjbiihclon) in your browser
|
|
10
|
+
- To generate reference applications you will also need [git](https://git-scm.com/)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Installation
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Install the latest beta version of Affinidi CLI
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @affinidi/cli@beta
|
|
18
|
+
```
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Uninstall the Affinidi CLI
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
```bash
|
|
23
|
+
npm uninstall -g @affinidi/cli
|
|
24
|
+
```
|
|
18
25
|
|
|
26
|
+
## What can I do with Affinidi CLI?
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
Affinidi CLI is all you need to interact and consume Affinidi services. Optionally you can also use [Affinidi Portal](https://portal.affinidi.com/) or call Affinidi APIs directly.
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
creating new business models and greater trust.
|
|
30
|
+
### Set up Affinidi Login for your applications
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
becoming increasingly important for developers to better manage data privacy and portability
|
|
27
|
-
within their apps. With our tooling, you can start creating a privacy-preserving app within minutes.
|
|
32
|
+
Affinidi CLI allows you to make the necessary configurations to add [Affinidi Login](https://www.affinidi.com/product/affinidi-login) to you applications for a secure, passwordless and privacy preserving login experience.
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
Learn more about how Affinidi Login works in the [documentation site](https://docs.affinidi.com/docs/affinidi-login/how-affinidi-login-works/).
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
All of the Affinidi Login commands can be found under `affinidi login <command>`
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
#### Login Configuration
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
The first thing you will want to do is create a login configuration. Read more about login configuration parameters [here](https://docs.affinidi.com/docs/affinidi-login/login-configuration/).
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
To create a login configuration use: [`affinidi login create-config`](#affinidi-login-create-config)
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
Your login configuration will be created under your CLI's active project. Learn more about [projects](#manage-your-projects) and the CLI's [active project](#active-project) below.
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
#### User Groups
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
- create projects, to better organise and manage what you are building
|
|
46
|
-
- access your API keys
|
|
48
|
+
You may also want to create user groups for your application. They allow you to set access privileges for your users inside your application. Learn more about user groups [here](https://docs.affinidi.com/docs/affinidi-login/user-groups/).
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
To create a user group use: [`affinidi login create-group`](#affinidi-login-create-group)
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
To add users to a group use: [`affinidi login add-user-to-group`](#affinidi-login-add-user-to-group)
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
#### Generate an Affinidi Login example application
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
With Affinidi CLI you can:
|
|
56
|
+
Integrating Affinidi Login in your application is straightforward as it uses the open standards of OAuth 2.0 and OpenID Connect with the addition of Verifiable Presentation support (OID4VP). As such you can use the tools your are already familiar.
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
- verify VCs
|
|
58
|
+
We have prepared an reference application that uses Next.js, NextAuth.js and Auth0 to get you started.
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
To generate a reference application use: [`affinidi generate app`](#affinidi-generate-app)
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
The reference application has an MIT license, so feel free to use it as you please.
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
#### Journey summary
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
```bash
|
|
67
|
+
# 1. Authenticate to Affinidi
|
|
68
|
+
affinidi start
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
# 2. Create your Identity Provider application and copy it's login callback URL
|
|
71
|
+
# For Auth0 this is https://{auth0-app-domain}/login/callback
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
# 3. Create your login configuration
|
|
74
|
+
affinidi login create-config -n MyNewLoginConfig -u "https://my-fancy-project.eu.auth0.com/login/callback"
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
# 2. Create the Affinidi Login social connector on your Identity Provider application
|
|
77
|
+
# Auth0 example: https://docs.affinidi.com/labs/affinidi-login-auth0/#configure-auth0-social-connection-with-affinidi-login
|
|
73
78
|
|
|
74
|
-
#
|
|
79
|
+
# 4. Generate a reference application with your login configuration
|
|
80
|
+
affinidi generate app
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
# 5. Run the reference application
|
|
83
|
+
```
|
|
77
84
|
|
|
78
|
-
###
|
|
85
|
+
### Manage your Affinidi resources and their access
|
|
79
86
|
|
|
80
|
-
|
|
87
|
+
For you and your team, as builders, Affinidi offers comprehensive IAM solutions:
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
- [NodeJs v16 and higher](https://nodejs.org). (it's recommended to use [nvm](https://github.com/nvm-sh/nvm))
|
|
89
|
+
#### Manage your projects
|
|
84
90
|
|
|
85
|
-
|
|
91
|
+
Affinidi projects allow you to manage and isolate Affinidi resources for your solution. You can also add or remove collaborators, manage permissions, enable billing and more. Think of them as Azure Resource Groups or GCP Projects.
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
npm install -g @affinidi/cli
|
|
89
|
-
```
|
|
93
|
+
When you first login into the CLI a default project is automatically created for you.
|
|
90
94
|
|
|
91
|
-
|
|
95
|
+
All project commands can be found under `affinidi project <command>`
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
affinidi --version
|
|
95
|
-
```
|
|
97
|
+
Create a project with [`affinidi project create-project`](#affinidi-project-create-project)
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
For convenience, the CLI adds the concept of Active Project. This is the project you are currently working on. Read more about the CLI's [active project](#active-project) below.
|
|
98
100
|
|
|
99
|
-
|
|
101
|
+
#### Create Personal Access Tokens (PAT) to call Affinidi APIs
|
|
100
102
|
|
|
101
|
-
To
|
|
103
|
+
To programmatically call Affinidi APIs in your applications or in your automation you will require a Personal Access Token (PAT). Think of Personal Access Tokens as machine users that can perform operations on your behalf. PATs live outside of projects, meaning that they can be granted access to multiple projects.
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
2. create a project, or activate a project if you already created one
|
|
105
|
+
PATs use asymmetric keys where you are responsible of creating and maintaining the key pair. Please read about more about how PAT authentication works and how you can create the keys [here](#how-does-pat-authentication-work).
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
All PAT commands can be found under `affinidi token <command>`
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
Create a PAT with [`affinidi token create-token`](#affinidi-token-create-token)
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
#### Assign users and PATs to your projects and grant them permissions (IAM)
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
affinidi sign-up
|
|
114
|
-
```
|
|
113
|
+
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.
|
|
115
114
|
|
|
116
|
-
|
|
115
|
+
These IAM commands work under a project, so make sure to set the desired [active project](#active-project) before running them.
|
|
117
116
|
|
|
118
|
-
|
|
119
|
-
affinidi login
|
|
120
|
-
```
|
|
117
|
+
All IAM commands can be found under `affinidi iam <command>`
|
|
121
118
|
|
|
122
|
-
|
|
123
|
-
[`sign-up`](#affinidi-sign-up)
|
|
124
|
-
[`login`](#affinidi-login)
|
|
119
|
+
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)_
|
|
125
120
|
|
|
126
|
-
|
|
121
|
+
2. Set the principal's access policies with [`affinidi iam update-policies`](#affinidi-iam-update-policies) - _Read more about policies [here](#how-do-policies-work)_
|
|
127
122
|
|
|
128
|
-
|
|
123
|
+
#### Journey summary
|
|
129
124
|
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
```bash
|
|
126
|
+
# 1. Authenticate to Affinidi
|
|
127
|
+
affinidi start
|
|
133
128
|
|
|
134
|
-
|
|
129
|
+
# 2. Create a new project
|
|
130
|
+
affinidi project create-project -n MyNewProject
|
|
135
131
|
|
|
136
|
-
|
|
137
|
-
affinidi
|
|
138
|
-
```
|
|
132
|
+
# 3. Set as CLI's active project
|
|
133
|
+
affinidi project select-project
|
|
139
134
|
|
|
140
|
-
|
|
135
|
+
# 4. Create a PAT
|
|
136
|
+
affinidi token create-token -n MyNewToken -k MyKeyID -f publicKey.pem
|
|
141
137
|
|
|
142
|
-
|
|
143
|
-
affinidi
|
|
138
|
+
# 5. Add the user or machine_user (PAT) to the project
|
|
139
|
+
affinidi iam add-principal --principal-id <uuid> --principal-type machine_user
|
|
140
|
+
|
|
141
|
+
# 6. Set the principal policies
|
|
142
|
+
affinidi iam update-policies --principal-id <uuid> --principal-type machine_user --file policies.json
|
|
143
|
+
|
|
144
|
+
# 7. Use PAT's private key to get a JWT and call Affinidi Services
|
|
144
145
|
```
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
[`create`](#affinidi-create)
|
|
148
|
-
[`use`](#affinidi-use)
|
|
147
|
+
## How do I use Affinidi CLI?
|
|
149
148
|
|
|
150
|
-
|
|
149
|
+
The first thing you will want to do in the CLI to access most features is to authenticate to Affinidi.
|
|
151
150
|
|
|
152
|
-
|
|
151
|
+
### Authenticating to Affinidi
|
|
153
152
|
|
|
154
|
-
|
|
153
|
+
Authenticating as a builder is also done with Affinidi Login, which requires you to have the Affinidi Vault extension.
|
|
155
154
|
|
|
155
|
+
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).
|
|
156
|
+
|
|
157
|
+
Once you have registered, authenticate in the CLI with:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
affinidi start
|
|
156
161
|
```
|
|
157
|
-
$ affinidi create schema [schemaName] --description=<value> --source=<value>
|
|
158
|
-
```
|
|
159
162
|
|
|
160
|
-
|
|
163
|
+
### Command structure and ways to call commands
|
|
164
|
+
|
|
165
|
+
Commands in Affinidi CLI have the following structure:
|
|
161
166
|
|
|
167
|
+
```bash
|
|
168
|
+
affinidi <topic> <command> [flags]
|
|
162
169
|
```
|
|
163
|
-
|
|
170
|
+
|
|
171
|
+
1. All commands starts with the keyword `affinidi`
|
|
172
|
+
2. Topics typically correspond to Affinidi services or domain
|
|
173
|
+
3. Commands corresponds to the actions to perform
|
|
174
|
+
4. Flags are a way to provide the parameters required by the command
|
|
175
|
+
|
|
176
|
+
You can input flags in different ways. All of the following will work:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
affinidi login create-config --file="config.json"
|
|
180
|
+
affinidi login create-config --file "config.json"
|
|
181
|
+
affinidi login create-config --file=config.json
|
|
182
|
+
affinidi login create-config --file config.json
|
|
183
|
+
affinidi login create-config -f "config.json"
|
|
184
|
+
affinidi login create-config -f="config.json"
|
|
185
|
+
affinidi login create-config -f"config.json"
|
|
186
|
+
affinidi login create-config -f config.json
|
|
187
|
+
affinidi login create-config -f=config.json
|
|
188
|
+
affinidi login create-config -fconfig.json
|
|
164
189
|
```
|
|
165
190
|
|
|
166
|
-
|
|
191
|
+
### Finding commands
|
|
167
192
|
|
|
168
|
-
|
|
169
|
-
Full reference for each command can be found here:
|
|
170
|
-
[`create`](#affinidi-create)
|
|
171
|
-
[`list`](#affinidi-list)
|
|
193
|
+
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.
|
|
172
194
|
|
|
173
|
-
|
|
195
|
+
There are some notable commands that don't belong to any topic and may be of use for you:
|
|
174
196
|
|
|
175
|
-
|
|
197
|
+
[`affinidi commands`](#affinidi-commands) - List all available commands
|
|
176
198
|
|
|
177
|
-
|
|
199
|
+
[`affinidi search`](#affinidi-search) - Search and navigate through available commands
|
|
178
200
|
|
|
179
|
-
|
|
180
|
-
$ affinidi issue-vc [EMAIL] --schema=<value> --data <value>
|
|
181
|
-
```
|
|
201
|
+
[`affinidi autocomplete`](#affinidi-autocomplete-shell) - Print the instructions to set up command autocomplete
|
|
182
202
|
|
|
183
|
-
|
|
203
|
+
[`affinidi help`](#affinidi-help-commands) - Print the help information of a topic or command
|
|
184
204
|
|
|
185
|
-
|
|
205
|
+
[`affinidi start`](#affinidi-start) Log in to Affinidi
|
|
186
206
|
|
|
187
|
-
|
|
188
|
-
$ affinidi verify-vc --data=<value>
|
|
189
|
-
```
|
|
207
|
+
[`affinidi stop`](#affinidi-stop) Log out of Affinidi
|
|
190
208
|
|
|
191
|
-
|
|
192
|
-
[issue-vc](#affinidi-issue-vc)
|
|
193
|
-
[verify-vc](#affinidi-verify-vc)
|
|
209
|
+
### Global flags
|
|
194
210
|
|
|
195
|
-
|
|
211
|
+
All commands have some global flags at their disposal.
|
|
196
212
|
|
|
197
|
-
|
|
213
|
+
`--help` Prints the command's help information.
|
|
198
214
|
|
|
199
|
-
|
|
200
|
-
$ affinidi generate-application --use-case=u ticketing
|
|
201
|
-
```
|
|
215
|
+
`--json` Enforce printing the output in json format. Useful for programmatic usage of CLI.
|
|
202
216
|
|
|
203
|
-
|
|
217
|
+
`--no-color` Disables color in the output. Useful if you have trouble distinguishing colors.
|
|
204
218
|
|
|
205
|
-
|
|
206
|
-
$ affinidi generate-application --name=<value> --use-case=ticketing
|
|
207
|
-
```
|
|
219
|
+
### Active Project
|
|
208
220
|
|
|
209
|
-
|
|
221
|
+
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.
|
|
210
222
|
|
|
211
|
-
|
|
223
|
+
To check what is the current active project use the command [`affinidi project get-active-project`](#affinidi-project-get-active-project)
|
|
212
224
|
|
|
213
|
-
|
|
225
|
+
To switch the active project use the command [`affinidi project select-project`](#affinidi-project-select-project)
|
|
214
226
|
|
|
215
|
-
|
|
227
|
+
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>`
|
|
216
228
|
|
|
217
|
-
|
|
229
|
+
### Session and configuration files
|
|
218
230
|
|
|
219
|
-
|
|
231
|
+
When you authenticate to Affinidi with `affinidi start` the CLI will create a folder with two files in your home directory.
|
|
220
232
|
|
|
221
|
-
|
|
233
|
+
`~/.affinidi/oAuthCred.json` - Stores your current session credentials. Keep it secret as this allows you to call Affinidi services.
|
|
222
234
|
|
|
223
|
-
|
|
235
|
+
`~/.affinidi/config-v2.json` - Stores user's CLI configurations (currently none)
|
|
224
236
|
|
|
225
|
-
|
|
226
|
-
$ affinidi analytics [true | false]
|
|
227
|
-
```
|
|
237
|
+
When you run `affinidi stop` your session information is deleted.
|
|
228
238
|
|
|
229
|
-
|
|
239
|
+
## How does PAT authentication work?
|
|
230
240
|
|
|
231
|
-
|
|
232
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view of the chosen project's details
|
|
233
|
-
```
|
|
241
|
+
In the following diagram you can find the flow of how you can set up a Personal Access Token and use it to call Affinidi APIs.
|
|
234
242
|
|
|
235
|
-
|
|
243
|
+
```mermaid
|
|
244
|
+
flowchart TB
|
|
245
|
+
subgraph CLI
|
|
246
|
+
user_token["1.1. Authenticate to Affinidi"]
|
|
247
|
+
create_project["1.2. Create project"]
|
|
248
|
+
project_access["1.3. Get project credentials"]
|
|
249
|
+
create_token["3.1. Create PAT"]
|
|
250
|
+
add_token_project["3.2. Add PAT to project"]
|
|
251
|
+
set_policies["3.3. Set PAT policies"]
|
|
236
252
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
253
|
+
user_token --> create_project
|
|
254
|
+
create_project --> project_access
|
|
255
|
+
user_token --> create_token
|
|
256
|
+
create_token --> add_token_project
|
|
257
|
+
project_access --> add_token_project
|
|
258
|
+
add_token_project --> set_policies
|
|
259
|
+
end
|
|
240
260
|
|
|
241
|
-
|
|
261
|
+
subgraph Application
|
|
262
|
+
direction TB
|
|
263
|
+
sign_jwt["4.1. Sign JWT"]
|
|
264
|
+
delegate_token["4.2. Exchange for delegate token"]
|
|
265
|
+
call_project_api["4.3. Call Affinidi APIs"]
|
|
242
266
|
|
|
243
|
-
|
|
244
|
-
|
|
267
|
+
sign_jwt --> delegate_token
|
|
268
|
+
delegate_token --> call_project_api
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
create_keys["2. Create key pair"]
|
|
272
|
+
create_keys -. "public key PEM" .-> create_token
|
|
273
|
+
create_keys -. "private key PEM" .-> sign_jwt
|
|
274
|
+
set_policies -. "allows" .-> call_project_api
|
|
245
275
|
```
|
|
246
276
|
|
|
247
|
-
|
|
277
|
+
1. Authenticate with Affinidi and set up your project
|
|
248
278
|
|
|
249
|
-
|
|
279
|
+
1. Authenticate with Affinidi - [`affinidi start`](#affinidi-start)
|
|
280
|
+
2. Create project - [`affinidi project create-project`](#affinidi-project-create-project)
|
|
281
|
+
3. Get project credentials - [`affinidi project select-project`](#affinidi-project-select-project)
|
|
250
282
|
|
|
251
|
-
|
|
283
|
+
2. Create and secure a key pair
|
|
252
284
|
|
|
253
|
-
|
|
254
|
-
$ affinidi autocomplete [SHELL] [FLAGS]
|
|
255
|
-
```
|
|
285
|
+
You can create a key pair using [openssl](https://www.openssl.org/docs/man1.1.1/man1/):
|
|
256
286
|
|
|
257
|
-
|
|
287
|
+
```bash
|
|
288
|
+
# Create an encrypted RSA private key with passphrase "hello"
|
|
289
|
+
openssl genpkey -algorithm RSA -out privateKey.pem -aes-128-cbc -pass pass:hello
|
|
258
290
|
|
|
259
|
-
|
|
260
|
-
|
|
291
|
+
# Extract the public key from the private key
|
|
292
|
+
openssl rsa -in privateKey.pem -pubout -out publicKey.pem
|
|
261
293
|
```
|
|
262
294
|
|
|
263
|
-
|
|
295
|
+
Remember your passphrase as you will need it later to sign with your private key.
|
|
264
296
|
|
|
265
|
-
|
|
266
|
-
-r, --refresh-cache Refresh cache (ignores displaying instructions)
|
|
267
|
-
```
|
|
297
|
+
Optionally you can rely on a cloud provider to securely manage your keys, such as [AWS KMS](https://aws.amazon.com/kms/), [GCP's Cloud KMS](https://cloud.google.com/security-key-management) or [Azure Key Vault](https://azure.microsoft.com/products/key-vault/)
|
|
268
298
|
|
|
269
|
-
|
|
299
|
+
3. Create a PAT and grant it permissions
|
|
270
300
|
|
|
271
|
-
|
|
272
|
-
|
|
301
|
+
1. Create PAT - [`affinidi token create-token`](#affinidi-token-create-token)
|
|
302
|
+
2. Add PAT to project - [`affinidi iam add-principal`](#affinidi-iam-add-principal)
|
|
303
|
+
3. Set PAT policies - [`affinidi iam update-policies`](#affinidi-iam-update-policies)
|
|
273
304
|
|
|
274
|
-
|
|
305
|
+
Remember the PAT Key ID as you will need it to sign with your private key. Read more about how to set policies [below](#how-do-policies-work).
|
|
275
306
|
|
|
276
|
-
|
|
307
|
+
4. Use the private key to call Affinidi APIs from your application
|
|
277
308
|
|
|
278
|
-
|
|
279
|
-
```
|
|
309
|
+
Learn more how to create a Delegate Tokens to call APIs in the next section.
|
|
280
310
|
|
|
281
|
-
|
|
311
|
+
### Delegate tokens
|
|
282
312
|
|
|
283
|
-
|
|
284
|
-
$ affinidi autocomplete --help
|
|
285
|
-
```
|
|
313
|
+
1. To create a delegate token you first need to sign a JWT with your private key. In the snippet below this is done with `signJWT(...)`. This should also be possible with third party key managers.
|
|
286
314
|
|
|
287
|
-
|
|
315
|
+
2. Once you have a signed JWT you can use it to exchange it for a user scoped token. In the snippet this is done with `getUserToken(...)`. You can use this token to call some Affinidi APIs, however most APIs require a project scoped token.
|
|
288
316
|
|
|
289
|
-
|
|
317
|
+
3. In the snippet we get a project scope token with `getProjectToken(...)`.
|
|
290
318
|
|
|
291
|
-
|
|
292
|
-
|
|
319
|
+
```javascript
|
|
320
|
+
import jwt from 'jsonwebtoken'
|
|
321
|
+
import qs from 'qs'
|
|
293
322
|
|
|
294
|
-
|
|
323
|
+
// Parameters required to sign JWT
|
|
324
|
+
const PRIVATE_KEY = process.env.PRIVATE_KEY
|
|
325
|
+
const ALGORITHM = process.env.ALGORITHM
|
|
326
|
+
const PASSPHRASE = process.env.PASSPHRASE
|
|
327
|
+
const KEY_ID = process.env.KEY_ID
|
|
295
328
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
```
|
|
329
|
+
// Parameter required to sign JWT and get User Scoped Token
|
|
330
|
+
const TOKEN_ID = process.env.TOKEN_ID
|
|
299
331
|
|
|
300
|
-
|
|
332
|
+
// Parameter required to get Project Scoped Token
|
|
333
|
+
const PROJECT_ID = process.env.PROJECT_ID
|
|
301
334
|
|
|
302
|
-
|
|
303
|
-
|
|
335
|
+
function signJWT(privateKey, algorithm, passphrase, keyId, tokenId) {
|
|
336
|
+
const issueTimeSeconds = Math.floor(new Date().getTime() / 1000)
|
|
337
|
+
const payload = {
|
|
338
|
+
iss: tokenId,
|
|
339
|
+
sub: tokenId,
|
|
340
|
+
aud: 'https://euw1.elements.auth.affinidi.io/oauth2/token',
|
|
341
|
+
jti: new Date().toString() + Math.random(),
|
|
342
|
+
exp: issueTimeSeconds + 5 * 60,
|
|
343
|
+
iat: issueTimeSeconds,
|
|
344
|
+
}
|
|
345
|
+
const secret = { key: privateKey, passphrase }
|
|
346
|
+
const options = { algorithm: algorithm, keyid: keyId }
|
|
347
|
+
return jwt.sign(payload, secret, options)
|
|
348
|
+
}
|
|
304
349
|
|
|
305
|
-
|
|
306
|
-
|
|
350
|
+
async function getUserToken(tokenId, signedJWT) {
|
|
351
|
+
const formData = qs.stringify({
|
|
352
|
+
grant_type: 'client_credentials',
|
|
353
|
+
scope: 'openid',
|
|
354
|
+
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
|
|
355
|
+
client_assertion: signedJWT,
|
|
356
|
+
client_id: tokenId,
|
|
357
|
+
})
|
|
358
|
+
const response = await fetch('https://euw1.elements.auth.affinidi.io/oauth2/token', {
|
|
359
|
+
method: 'POST',
|
|
360
|
+
body: formData,
|
|
361
|
+
headers: {
|
|
362
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
363
|
+
},
|
|
364
|
+
})
|
|
365
|
+
if (response.status !== 200) throw new Error('Could not get user token')
|
|
366
|
+
return response.json()
|
|
367
|
+
}
|
|
307
368
|
|
|
308
|
-
|
|
369
|
+
async function getProjectToken(projectId, userScopeToken) {
|
|
370
|
+
const response = await fetch('https://apse1.api.affinidi.io/iam/v1/create-project-scoped-token', {
|
|
371
|
+
method: 'POST',
|
|
372
|
+
body: JSON.stringify({ projectId }),
|
|
373
|
+
headers: {
|
|
374
|
+
Authorization: `Bearer ${userScopeToken}`,
|
|
375
|
+
'Content-Type': 'application/json',
|
|
376
|
+
},
|
|
377
|
+
})
|
|
378
|
+
if (response.status !== 200) throw new Error('Could not get project token')
|
|
379
|
+
return response.json()
|
|
380
|
+
}
|
|
309
381
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
382
|
+
const signedJWT = signJWT(PRIVATE_KEY, ALGORITHM, PASSPHRASE, KEY_ID, TOKEN_ID)
|
|
383
|
+
const userScopeToken = (await getUserToken(TOKEN_ID, signedJWT)).access_token
|
|
384
|
+
const projectScopeToken = (await getProjectToken(PROJECT_ID, userScopeToken)).accessToken
|
|
313
385
|
```
|
|
314
386
|
|
|
315
|
-
|
|
387
|
+
4. With these tokens you can now call Affinidi APIs:
|
|
316
388
|
|
|
317
|
-
```
|
|
318
|
-
|
|
389
|
+
```javascript
|
|
390
|
+
const response = await fetch('https://apse1.api.affinidi.io/vpa/v1/login/configurations', {
|
|
391
|
+
headers: {
|
|
392
|
+
Authorization: `Bearer ${projectScopeToken}`,
|
|
393
|
+
},
|
|
394
|
+
})
|
|
395
|
+
const configurations = await response.json()
|
|
396
|
+
console.log(configurations)
|
|
319
397
|
```
|
|
320
398
|
|
|
321
|
-
|
|
399
|
+
## How do policies work?
|
|
322
400
|
|
|
323
|
-
|
|
324
|
-
affinidi config --unset-all
|
|
401
|
+
WIP
|
|
325
402
|
|
|
326
|
-
|
|
403
|
+
## Support & Feedback
|
|
327
404
|
|
|
328
|
-
|
|
329
|
-
```
|
|
405
|
+
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).
|
|
330
406
|
|
|
331
|
-
|
|
407
|
+
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.
|
|
332
408
|
|
|
333
|
-
|
|
334
|
-
affinidi config --help
|
|
335
|
-
```
|
|
409
|
+
## FAQ
|
|
336
410
|
|
|
337
|
-
###
|
|
411
|
+
### A note from Affinidi
|
|
338
412
|
|
|
339
|
-
Use
|
|
413
|
+
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.
|
|
340
414
|
|
|
341
|
-
|
|
342
|
-
- schema
|
|
415
|
+
### What can I develop?
|
|
343
416
|
|
|
344
|
-
|
|
417
|
+
You are only limited by your imagination! Affinidi CLI is a toolbox with which you can build software applications for personal or commercial use.
|
|
345
418
|
|
|
346
|
-
|
|
347
|
-
$ affinidi create SUBCOMMAND [ARGS...] [FLAGS]
|
|
348
|
-
```
|
|
419
|
+
### Is there anything I should not develop?
|
|
349
420
|
|
|
350
|
-
|
|
421
|
+
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!
|
|
351
422
|
|
|
352
|
-
|
|
353
|
-
project Creates a new Affinidi project.
|
|
354
|
-
schema Creates a new schema for a verifiable credential.
|
|
355
|
-
```
|
|
423
|
+
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).
|
|
356
424
|
|
|
357
|
-
|
|
425
|
+
### What responsibilities do I have to my end-users?
|
|
358
426
|
|
|
359
|
-
|
|
360
|
-
$ affinidi create project [projectName]
|
|
361
|
-
```
|
|
427
|
+
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.
|
|
362
428
|
|
|
363
|
-
|
|
429
|
+
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.
|
|
364
430
|
|
|
365
|
-
|
|
366
|
-
$ affinidi create project
|
|
367
|
-
```
|
|
431
|
+
Some of our components would also require you to incorporate our end-user notices into your terms and conditions.
|
|
368
432
|
|
|
369
|
-
|
|
433
|
+
### Is Affinidi CLI free for use?
|
|
370
434
|
|
|
371
|
-
|
|
435
|
+
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.
|
|
372
436
|
|
|
373
|
-
|
|
374
|
-
-o, --output=(plaintext|json) [default: plaintext] Formats output view
|
|
375
|
-
```
|
|
437
|
+
### Is there any limit or cap to my usage of the Affinidi CLI?
|
|
376
438
|
|
|
377
|
-
|
|
439
|
+
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.
|
|
378
440
|
|
|
379
|
-
|
|
380
|
-
$ affinidi create schema [schemaName] [FLAGS]
|
|
381
|
-
```
|
|
441
|
+
### Do I need to provide you with anything?
|
|
382
442
|
|
|
383
|
-
|
|
443
|
+
From time to time, we may request certain information from you to ensure that you are complying with the [Terms of Use](https://www.affinidi.com/terms-of-use).
|
|
444
|
+
|
|
445
|
+
### Can I share my developer’s account with others?
|
|
446
|
+
|
|
447
|
+
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!
|
|
448
|
+
|
|
449
|
+
### Telemetry
|
|
450
|
+
|
|
451
|
+
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 Policy](https://www.affinidi.com/privacy-policy).
|
|
452
|
+
|
|
453
|
+
_Disclaimer:
|
|
454
|
+
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 of Use](https://www.affinidi.com/terms-of-use)._
|
|
455
|
+
|
|
456
|
+
## All commands
|
|
457
|
+
|
|
458
|
+
<!-- commands -->
|
|
459
|
+
* [`affinidi autocomplete [SHELL]`](#affinidi-autocomplete-shell)
|
|
460
|
+
* [`affinidi commands`](#affinidi-commands)
|
|
461
|
+
* [`affinidi generate app`](#affinidi-generate-app)
|
|
462
|
+
* [`affinidi help [COMMANDS]`](#affinidi-help-commands)
|
|
463
|
+
* [`affinidi iam add-principal`](#affinidi-iam-add-principal)
|
|
464
|
+
* [`affinidi iam get-policies`](#affinidi-iam-get-policies)
|
|
465
|
+
* [`affinidi iam list-principals`](#affinidi-iam-list-principals)
|
|
466
|
+
* [`affinidi iam remove-principal`](#affinidi-iam-remove-principal)
|
|
467
|
+
* [`affinidi iam update-policies`](#affinidi-iam-update-policies)
|
|
468
|
+
* [`affinidi login add-user-to-group`](#affinidi-login-add-user-to-group)
|
|
469
|
+
* [`affinidi login create-config`](#affinidi-login-create-config)
|
|
470
|
+
* [`affinidi login create-group`](#affinidi-login-create-group)
|
|
471
|
+
* [`affinidi login delete-config`](#affinidi-login-delete-config)
|
|
472
|
+
* [`affinidi login delete-group`](#affinidi-login-delete-group)
|
|
473
|
+
* [`affinidi login get-config`](#affinidi-login-get-config)
|
|
474
|
+
* [`affinidi login get-group`](#affinidi-login-get-group)
|
|
475
|
+
* [`affinidi login list-configs`](#affinidi-login-list-configs)
|
|
476
|
+
* [`affinidi login list-groups`](#affinidi-login-list-groups)
|
|
477
|
+
* [`affinidi login list-users-in-group`](#affinidi-login-list-users-in-group)
|
|
478
|
+
* [`affinidi login remove-user-from-group`](#affinidi-login-remove-user-from-group)
|
|
479
|
+
* [`affinidi login update-config`](#affinidi-login-update-config)
|
|
480
|
+
* [`affinidi project create-project`](#affinidi-project-create-project)
|
|
481
|
+
* [`affinidi project get-active-project`](#affinidi-project-get-active-project)
|
|
482
|
+
* [`affinidi project list-projects`](#affinidi-project-list-projects)
|
|
483
|
+
* [`affinidi project select-project`](#affinidi-project-select-project)
|
|
484
|
+
* [`affinidi search`](#affinidi-search)
|
|
485
|
+
* [`affinidi start`](#affinidi-start)
|
|
486
|
+
* [`affinidi stop`](#affinidi-stop)
|
|
487
|
+
* [`affinidi token create-token`](#affinidi-token-create-token)
|
|
488
|
+
* [`affinidi token delete-token`](#affinidi-token-delete-token)
|
|
489
|
+
* [`affinidi token get-token`](#affinidi-token-get-token)
|
|
490
|
+
* [`affinidi token list-tokens`](#affinidi-token-list-tokens)
|
|
491
|
+
* [`affinidi token update-token`](#affinidi-token-update-token)
|
|
492
|
+
|
|
493
|
+
## `affinidi autocomplete [SHELL]`
|
|
494
|
+
|
|
495
|
+
display autocomplete installation instructions
|
|
384
496
|
|
|
385
497
|
```
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
498
|
+
USAGE
|
|
499
|
+
$ affinidi autocomplete [SHELL] [-r]
|
|
500
|
+
|
|
501
|
+
ARGUMENTS
|
|
502
|
+
SHELL (zsh|bash|powershell) Shell type
|
|
503
|
+
|
|
504
|
+
FLAGS
|
|
505
|
+
-r, --refresh-cache Refresh cache (ignores displaying instructions)
|
|
506
|
+
|
|
507
|
+
DESCRIPTION
|
|
508
|
+
display autocomplete installation instructions
|
|
391
509
|
|
|
392
|
-
Please see [How to structure a schema](#how-to-structure-a-schema) for guidance on how to create the _source_ file.
|
|
393
510
|
EXAMPLES
|
|
511
|
+
$ affinidi autocomplete
|
|
394
512
|
|
|
395
|
-
|
|
396
|
-
$ affinidi create project "Example Project"
|
|
513
|
+
$ affinidi autocomplete bash
|
|
397
514
|
|
|
398
|
-
$ affinidi
|
|
399
|
-
```
|
|
515
|
+
$ affinidi autocomplete zsh
|
|
400
516
|
|
|
401
|
-
|
|
517
|
+
$ affinidi autocomplete powershell
|
|
402
518
|
|
|
403
|
-
|
|
404
|
-
$ affinidi create --help
|
|
405
|
-
$ affinidi create project --help
|
|
406
|
-
$ affinidi create schema --help
|
|
519
|
+
$ affinidi autocomplete --refresh-cache
|
|
407
520
|
```
|
|
408
521
|
|
|
409
|
-
|
|
522
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v2.3.6/src/commands/autocomplete/index.ts)_
|
|
410
523
|
|
|
411
|
-
|
|
524
|
+
## `affinidi commands`
|
|
412
525
|
|
|
413
|
-
|
|
526
|
+
list all the commands
|
|
414
527
|
|
|
415
528
|
```
|
|
416
|
-
|
|
417
|
-
|
|
529
|
+
USAGE
|
|
530
|
+
$ affinidi commands [--json] [-h] [--hidden] [--tree] [--columns <value> | -x] [--sort <value>] [--filter
|
|
531
|
+
<value>] [--output csv|json|yaml | | [--csv | --no-truncate]] [--no-header | ]
|
|
418
532
|
|
|
419
533
|
FLAGS
|
|
534
|
+
-h, --help Show CLI help.
|
|
535
|
+
-x, --extended show extra columns
|
|
536
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
537
|
+
--csv output is csv format [alias: --output=csv]
|
|
538
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
539
|
+
--hidden show hidden commands
|
|
540
|
+
--no-header hide table header from output
|
|
541
|
+
--no-truncate do not truncate output to fit screen
|
|
542
|
+
--output=<option> output in a more machine friendly format
|
|
543
|
+
<options: csv|json|yaml>
|
|
544
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
545
|
+
--tree show tree of commands
|
|
420
546
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
547
|
+
GLOBAL FLAGS
|
|
548
|
+
--json Format output as json.
|
|
549
|
+
|
|
550
|
+
DESCRIPTION
|
|
551
|
+
list all the commands
|
|
425
552
|
```
|
|
426
553
|
|
|
427
|
-
|
|
554
|
+
_See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/v2.2.25/src/commands/commands.ts)_
|
|
428
555
|
|
|
429
|
-
|
|
430
|
-
$ affinidi generate-application
|
|
431
|
-
```
|
|
556
|
+
## `affinidi generate app`
|
|
432
557
|
|
|
433
|
-
|
|
558
|
+
Clone a reference application and create Auth0 connection
|
|
434
559
|
|
|
435
560
|
```
|
|
436
|
-
|
|
561
|
+
USAGE
|
|
562
|
+
$ affinidi generate app [--json] [--no-color] [-p <value>] [--force]
|
|
437
563
|
|
|
438
|
-
|
|
564
|
+
FLAGS
|
|
565
|
+
-p, --path=<value> Relative or absolute path where reference application should be cloned into
|
|
566
|
+
--force Override destination directory if exists
|
|
439
567
|
|
|
440
|
-
|
|
441
|
-
|
|
568
|
+
GLOBAL FLAGS
|
|
569
|
+
--json Format output as json.
|
|
570
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
442
571
|
|
|
443
|
-
|
|
572
|
+
EXAMPLES
|
|
573
|
+
$ affinidi generate app
|
|
444
574
|
|
|
445
|
-
|
|
446
|
-
|
|
575
|
+
$ affinidi generate app -p <PATH_WHERE_TO_CLONE_REFERENCE_APP>
|
|
576
|
+
|
|
577
|
+
$ affinidi generate app --path <PATH_WHERE_TO_CLONE_REFERENCE_APP> --force
|
|
447
578
|
```
|
|
448
579
|
|
|
449
|
-
|
|
580
|
+
## `affinidi help [COMMANDS]`
|
|
450
581
|
|
|
451
|
-
Display help for affinidi
|
|
582
|
+
Display help for affinidi.
|
|
452
583
|
|
|
584
|
+
```
|
|
453
585
|
USAGE
|
|
586
|
+
$ affinidi help [COMMANDS] [-n]
|
|
454
587
|
|
|
455
|
-
|
|
456
|
-
|
|
588
|
+
ARGUMENTS
|
|
589
|
+
COMMANDS Command to show help for.
|
|
590
|
+
|
|
591
|
+
FLAGS
|
|
592
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
593
|
+
|
|
594
|
+
DESCRIPTION
|
|
595
|
+
Display help for affinidi.
|
|
457
596
|
```
|
|
458
597
|
|
|
459
|
-
|
|
598
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.18/src/commands/help.ts)_
|
|
460
599
|
|
|
461
|
-
|
|
600
|
+
## `affinidi iam add-principal`
|
|
462
601
|
|
|
463
|
-
|
|
602
|
+
Adds a principal (user or token) to the active project
|
|
464
603
|
|
|
465
604
|
```
|
|
466
|
-
|
|
467
|
-
|
|
605
|
+
USAGE
|
|
606
|
+
$ affinidi iam add-principal [--json] [--no-color] [-i <value>] [-t machine_user|user]
|
|
468
607
|
|
|
469
608
|
FLAGS
|
|
609
|
+
-i, --principal-id=<value> ID of the principal
|
|
610
|
+
-t, --principal-type=<option> [default: machine_user] Type of the principal
|
|
611
|
+
<options: machine_user|user>
|
|
470
612
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
613
|
+
GLOBAL FLAGS
|
|
614
|
+
--json Format output as json.
|
|
615
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
616
|
+
|
|
617
|
+
DESCRIPTION
|
|
618
|
+
Adds a principal (user or token) to the active project
|
|
619
|
+
|
|
620
|
+
To change your active project, use command affinidi project select-project
|
|
478
621
|
|
|
479
622
|
EXAMPLES
|
|
623
|
+
$ affinidi iam add-principal -i <uuid>
|
|
480
624
|
|
|
481
|
-
|
|
482
|
-
$ affinidi issue-vc example@email.com -s "https://example.org/exampleSchema.json" -d "/exampleCredential.json"
|
|
625
|
+
$ affinidi iam add-principal --principal-id <uuid> --principal-type machine_user
|
|
483
626
|
|
|
484
|
-
|
|
627
|
+
FLAG DESCRIPTIONS
|
|
628
|
+
-i, --principal-id=<value> ID of the principal
|
|
485
629
|
|
|
630
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
486
631
|
```
|
|
487
632
|
|
|
488
|
-
|
|
633
|
+
## `affinidi iam get-policies`
|
|
634
|
+
|
|
635
|
+
Gets the policies of a principal (user or token)
|
|
489
636
|
|
|
490
637
|
```
|
|
491
|
-
|
|
492
|
-
|
|
638
|
+
USAGE
|
|
639
|
+
$ affinidi iam get-policies [--json] [--no-color] [-i <value>] [-t machine_user|user]
|
|
493
640
|
|
|
494
|
-
|
|
641
|
+
FLAGS
|
|
642
|
+
-i, --principal-id=<value> ID of the principal
|
|
643
|
+
-t, --principal-type=<option> [default: machine_user] Type of the principal
|
|
644
|
+
<options: machine_user|user>
|
|
495
645
|
|
|
496
|
-
|
|
497
|
-
|
|
646
|
+
GLOBAL FLAGS
|
|
647
|
+
--json Format output as json.
|
|
648
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
498
649
|
|
|
499
|
-
|
|
500
|
-
|
|
650
|
+
DESCRIPTION
|
|
651
|
+
Gets the policies of a principal (user or token)
|
|
501
652
|
|
|
502
|
-
|
|
653
|
+
Make sure the principal you are working with is part of the active project
|
|
654
|
+
Use command affinidi project select-project to change your active project
|
|
503
655
|
|
|
504
|
-
|
|
505
|
-
$ affinidi
|
|
506
|
-
```
|
|
656
|
+
EXAMPLES
|
|
657
|
+
$ affinidi iam get-policies -i <uuid>
|
|
507
658
|
|
|
508
|
-
|
|
659
|
+
$ affinidi iam get-policies --principal-id <uuid> --principal-type machine_user
|
|
509
660
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
661
|
+
FLAG DESCRIPTIONS
|
|
662
|
+
-i, --principal-id=<value> ID of the principal
|
|
663
|
+
|
|
664
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
513
665
|
```
|
|
514
666
|
|
|
515
|
-
|
|
667
|
+
## `affinidi iam list-principals`
|
|
668
|
+
|
|
669
|
+
Lists the principals (users and tokens) in the active project
|
|
516
670
|
|
|
517
671
|
```
|
|
518
|
-
|
|
519
|
-
-
|
|
520
|
-
-s, --skip=<value> Index into projects list from which to start the listing
|
|
521
|
-
```
|
|
672
|
+
USAGE
|
|
673
|
+
$ affinidi iam list-principals [--json] [--no-color]
|
|
522
674
|
|
|
523
|
-
FLAGS
|
|
675
|
+
GLOBAL FLAGS
|
|
676
|
+
--json Format output as json.
|
|
677
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
524
678
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
-l, --limit=<value> [default: 10] The number of schemas to display
|
|
528
|
-
-o, --output=(json|table|csv) [default: json] The type of output
|
|
529
|
-
-p, --public=(true|false) [default: true] To specify if you want to get public or private schemas
|
|
530
|
-
-s, --skip=<value> The number of schemas to skip
|
|
531
|
-
-x, --extended show extra columns
|
|
532
|
-
--columns=<value> only show provided columns (comma-separated)
|
|
533
|
-
--csv output is csv format [alias: --output=csv]
|
|
534
|
-
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
535
|
-
--no-header hide table header from output
|
|
536
|
-
--no-truncate do not truncate output to fit screen
|
|
537
|
-
--sort=<value> property to sort by (prepend '-' for descending)
|
|
538
|
-
```
|
|
679
|
+
DESCRIPTION
|
|
680
|
+
Lists the principals (users and tokens) in the active project
|
|
539
681
|
|
|
540
|
-
|
|
682
|
+
To change your active project, use command affinidi project select-project
|
|
541
683
|
|
|
684
|
+
EXAMPLES
|
|
685
|
+
$ affinidi iam list-principals
|
|
542
686
|
```
|
|
543
|
-
$ affinidi list projects
|
|
544
687
|
|
|
545
|
-
|
|
546
|
-
```
|
|
688
|
+
## `affinidi iam remove-principal`
|
|
547
689
|
|
|
548
|
-
|
|
690
|
+
Removes a principal (user or token) from the active project
|
|
549
691
|
|
|
550
692
|
```
|
|
551
|
-
|
|
552
|
-
$ affinidi
|
|
553
|
-
$ affinidi list schemas --help
|
|
554
|
-
```
|
|
693
|
+
USAGE
|
|
694
|
+
$ affinidi iam remove-principal [--json] [--no-color] [-i <value>] [-t machine_user|user]
|
|
555
695
|
|
|
556
|
-
|
|
696
|
+
FLAGS
|
|
697
|
+
-i, --principal-id=<value> ID of the principal
|
|
698
|
+
-t, --principal-type=<option> [default: machine_user] Type of the principal
|
|
699
|
+
<options: machine_user|user>
|
|
557
700
|
|
|
558
|
-
|
|
701
|
+
GLOBAL FLAGS
|
|
702
|
+
--json Format output as json.
|
|
703
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
559
704
|
|
|
560
|
-
|
|
705
|
+
DESCRIPTION
|
|
706
|
+
Removes a principal (user or token) from the active project
|
|
561
707
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
708
|
+
To change your active project, use command affinidi project select-project
|
|
709
|
+
|
|
710
|
+
EXAMPLES
|
|
711
|
+
$ affinidi iam remove-principal -i <uuid>
|
|
565
712
|
|
|
566
|
-
|
|
713
|
+
$ affinidi iam remove-principal --principal-id <uuid> --principal-type machine_user
|
|
567
714
|
|
|
715
|
+
FLAG DESCRIPTIONS
|
|
716
|
+
-i, --principal-id=<value> ID of the principal
|
|
717
|
+
|
|
718
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
568
719
|
```
|
|
569
|
-
|
|
720
|
+
|
|
721
|
+
## `affinidi iam update-policies`
|
|
722
|
+
|
|
723
|
+
Updates the policies of a principal (user or token) in the active project
|
|
724
|
+
|
|
570
725
|
```
|
|
726
|
+
USAGE
|
|
727
|
+
$ affinidi iam update-policies [--json] [--no-color] [-i <value>] [-t machine_user|user] [-f <value>]
|
|
571
728
|
|
|
572
729
|
FLAGS
|
|
730
|
+
-f, --file=<value> Location of a json file containing principal policies
|
|
731
|
+
-i, --principal-id=<value> ID of the principal
|
|
732
|
+
-t, --principal-type=<option> [default: machine_user] Type of the principal
|
|
733
|
+
<options: machine_user|user>
|
|
573
734
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
735
|
+
GLOBAL FLAGS
|
|
736
|
+
--json Format output as json.
|
|
737
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
577
738
|
|
|
578
|
-
|
|
739
|
+
DESCRIPTION
|
|
740
|
+
Updates the policies of a principal (user or token) in the active project
|
|
579
741
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
```
|
|
742
|
+
Make sure the principal you are working with is part of the active project
|
|
743
|
+
Use command affinidi project select-project to change your active project
|
|
583
744
|
|
|
584
|
-
|
|
745
|
+
EXAMPLES
|
|
746
|
+
$ affinidi iam update-policies -i <uuid>
|
|
585
747
|
|
|
586
|
-
|
|
748
|
+
$ affinidi iam update-policies --principal-id <uuid> --principal-type machine_user --file policies.json
|
|
587
749
|
|
|
588
|
-
|
|
750
|
+
FLAG DESCRIPTIONS
|
|
751
|
+
-i, --principal-id=<value> ID of the principal
|
|
589
752
|
|
|
590
|
-
|
|
591
|
-
$ affinidi logout
|
|
753
|
+
Get a list of possible IDs with command affinidi token list-tokens
|
|
592
754
|
```
|
|
593
755
|
|
|
594
|
-
|
|
756
|
+
## `affinidi login add-user-to-group`
|
|
757
|
+
|
|
758
|
+
Adds a user to a user group
|
|
595
759
|
|
|
596
760
|
```
|
|
597
|
-
|
|
598
|
-
|
|
761
|
+
USAGE
|
|
762
|
+
$ affinidi login add-user-to-group [--json] [--no-color] [--group-name <value>] [--user-sub <value>]
|
|
599
763
|
|
|
600
764
|
FLAGS
|
|
765
|
+
--group-name=<value> Name of the user group
|
|
766
|
+
--user-sub=<value> Subject of the user. Currently the user's DID is supported.
|
|
601
767
|
|
|
602
|
-
|
|
603
|
-
|
|
768
|
+
GLOBAL FLAGS
|
|
769
|
+
--json Format output as json.
|
|
770
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
771
|
+
|
|
772
|
+
EXAMPLES
|
|
773
|
+
$ affinidi login add-user-to-group --group-name my_group --user-sub did:key:12345
|
|
604
774
|
```
|
|
605
775
|
|
|
606
|
-
|
|
776
|
+
## `affinidi login create-config`
|
|
607
777
|
|
|
608
|
-
|
|
778
|
+
Creates a login configuration in your active project
|
|
609
779
|
|
|
780
|
+
```
|
|
610
781
|
USAGE
|
|
782
|
+
$ affinidi login create-config [--json] [--no-color] [-f <value> | -n <value> | -u <value> |
|
|
783
|
+
--token-endpoint-auth-method client_secret_basic|client_secret_post|none | --claim-format array|map | --client-name
|
|
784
|
+
<value> | --client-origin <value> | --client-logo <value>]
|
|
785
|
+
|
|
786
|
+
FLAGS
|
|
787
|
+
-f, --file=<value> Location of a json file containing login configuration data
|
|
788
|
+
-n, --name=<value> Name of the login configuration
|
|
789
|
+
-u, --redirect-uris=<value> OAuth 2.0 redirect URIs, separated by space
|
|
790
|
+
--claim-format=<option> ID token claims output format. Defaults to array
|
|
791
|
+
<options: array|map>
|
|
792
|
+
--client-logo=<value> URL of a logo for the client, displayed in the consent page
|
|
793
|
+
--client-name=<value> Name of the client, displayed in the consent page
|
|
794
|
+
--client-origin=<value> Origin of the client, displayed in the consent page
|
|
795
|
+
--token-endpoint-auth-method=<option> Client authentication method for the token endpoint. Defaults to
|
|
796
|
+
client_secret_post
|
|
797
|
+
<options: client_secret_basic|client_secret_post|none>
|
|
798
|
+
|
|
799
|
+
GLOBAL FLAGS
|
|
800
|
+
--json Format output as json.
|
|
801
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
802
|
+
|
|
803
|
+
EXAMPLES
|
|
804
|
+
$ affinidi login create-config
|
|
611
805
|
|
|
806
|
+
$ affinidi login create-config -f loginConfig.json
|
|
807
|
+
|
|
808
|
+
$ affinidi login create-config -n MyLoginConfig -u http://localhost:8080/callback
|
|
809
|
+
|
|
810
|
+
$ 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 --scope "my_user_group my_other_group" --client-name "My App Name" --client-origin http://localhost:8080 --client-logo http://localhost:8080/logo
|
|
811
|
+
|
|
812
|
+
FLAG DESCRIPTIONS
|
|
813
|
+
--token-endpoint-auth-method=client_secret_basic|client_secret_post|none
|
|
814
|
+
|
|
815
|
+
Client authentication method for the token endpoint. Defaults to client_secret_post
|
|
816
|
+
|
|
817
|
+
The options are:
|
|
818
|
+
client_secret_post: (default) Send client_id and client_secret as application/x-www-form-urlencoded in the HTTP body
|
|
819
|
+
client_secret_basic: Send client_id and client_secret as application/x-www-form-urlencoded encoded in the HTTP
|
|
820
|
+
Authorization header
|
|
821
|
+
none: For public clients (native/mobile apps) which can not have a secret
|
|
612
822
|
```
|
|
613
|
-
|
|
823
|
+
|
|
824
|
+
## `affinidi login create-group`
|
|
825
|
+
|
|
826
|
+
Create a user group in your active project
|
|
827
|
+
|
|
614
828
|
```
|
|
829
|
+
USAGE
|
|
830
|
+
$ affinidi login create-group [--json] [--no-color] [-n <value>]
|
|
615
831
|
|
|
616
832
|
FLAGS
|
|
833
|
+
-n, --name=<value> Name of the user group, that follows url-friendly pattern ^[a-z_]+$
|
|
617
834
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
-
|
|
621
|
-
```
|
|
835
|
+
GLOBAL FLAGS
|
|
836
|
+
--json Format output as json.
|
|
837
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
622
838
|
|
|
623
839
|
EXAMPLES
|
|
840
|
+
$ affinidi login create-group -n my_new_group
|
|
624
841
|
|
|
625
|
-
|
|
626
|
-
$ affinidi rename project example-id -n "New Name"
|
|
842
|
+
$ affinidi login create-group --name my_new_group
|
|
627
843
|
```
|
|
628
844
|
|
|
629
|
-
|
|
845
|
+
## `affinidi login delete-config`
|
|
630
846
|
|
|
631
|
-
|
|
632
|
-
$ affinidi rename project --help
|
|
633
|
-
```
|
|
847
|
+
Deletes a login configuration from your active project
|
|
634
848
|
|
|
635
|
-
|
|
849
|
+
```
|
|
850
|
+
USAGE
|
|
851
|
+
$ affinidi login delete-config [--json] [--no-color] [-i <value>]
|
|
636
852
|
|
|
637
|
-
|
|
853
|
+
FLAGS
|
|
854
|
+
-i, --id=<value> ID of the login configuration
|
|
638
855
|
|
|
639
|
-
|
|
640
|
-
|
|
856
|
+
GLOBAL FLAGS
|
|
857
|
+
--json Format output as json.
|
|
858
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
641
859
|
|
|
642
|
-
|
|
860
|
+
EXAMPLES
|
|
861
|
+
$ affinidi login delete-config -i <value>
|
|
643
862
|
|
|
644
|
-
|
|
645
|
-
$ affinidi show [SUBCOMMAND] [ARG...] [FLAGS]
|
|
863
|
+
$ affinidi login delete-config --id <value>
|
|
646
864
|
```
|
|
647
865
|
|
|
648
|
-
|
|
866
|
+
## `affinidi login delete-group`
|
|
867
|
+
|
|
868
|
+
Deletes a user group from your active project
|
|
649
869
|
|
|
650
870
|
```
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
user Shows info about logged-in user
|
|
654
|
-
```
|
|
871
|
+
USAGE
|
|
872
|
+
$ affinidi login delete-group [--json] [--no-color] [-n <value>]
|
|
655
873
|
|
|
656
|
-
|
|
874
|
+
FLAGS
|
|
875
|
+
-n, --name=<value> Name of the user group
|
|
657
876
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
-
|
|
661
|
-
```
|
|
877
|
+
GLOBAL FLAGS
|
|
878
|
+
--json Format output as json.
|
|
879
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
662
880
|
|
|
663
|
-
|
|
881
|
+
EXAMPLES
|
|
882
|
+
$ affinidi login delete-group -n my_group
|
|
664
883
|
|
|
665
|
-
|
|
666
|
-
$ affinidi show [<project-id>]
|
|
884
|
+
$ affinidi login delete-group --name my_group
|
|
667
885
|
```
|
|
668
886
|
|
|
669
|
-
|
|
887
|
+
## `affinidi login get-config`
|
|
888
|
+
|
|
889
|
+
Gets the details of a login configuration in your active project
|
|
670
890
|
|
|
671
891
|
```
|
|
672
|
-
|
|
673
|
-
|
|
892
|
+
USAGE
|
|
893
|
+
$ affinidi login get-config [--json] [--no-color] [-i <value>]
|
|
674
894
|
|
|
675
|
-
|
|
895
|
+
FLAGS
|
|
896
|
+
-i, --id=<value> ID of the login configuration
|
|
676
897
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
-
|
|
680
|
-
```
|
|
898
|
+
GLOBAL FLAGS
|
|
899
|
+
--json Format output as json.
|
|
900
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
681
901
|
|
|
682
|
-
|
|
902
|
+
EXAMPLES
|
|
903
|
+
$ affinidi login get-config -i <value>
|
|
683
904
|
|
|
684
|
-
|
|
685
|
-
$ affinidi show schema [<schema-id>] [--output json]
|
|
905
|
+
$ affinidi login get-config --id <value>
|
|
686
906
|
```
|
|
687
907
|
|
|
688
|
-
|
|
908
|
+
## `affinidi login get-group`
|
|
909
|
+
|
|
910
|
+
Gets the details of a user group
|
|
689
911
|
|
|
690
912
|
```
|
|
691
|
-
|
|
692
|
-
|
|
913
|
+
USAGE
|
|
914
|
+
$ affinidi login get-group [--json] [--no-color] [-n <value>]
|
|
693
915
|
|
|
694
|
-
|
|
916
|
+
FLAGS
|
|
917
|
+
-n, --name=<value> Name of the user group
|
|
695
918
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
919
|
+
GLOBAL FLAGS
|
|
920
|
+
--json Format output as json.
|
|
921
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
699
922
|
|
|
700
923
|
EXAMPLES
|
|
924
|
+
$ affinidi login get-group -n my_group
|
|
701
925
|
|
|
926
|
+
$ affinidi login get-group --name my_group
|
|
702
927
|
```
|
|
703
|
-
$ affinidi show project example-id
|
|
704
928
|
|
|
705
|
-
|
|
929
|
+
## `affinidi login list-configs`
|
|
930
|
+
|
|
931
|
+
Lists login configurations in your active project
|
|
706
932
|
|
|
707
|
-
$ affinidi show user
|
|
708
933
|
```
|
|
934
|
+
USAGE
|
|
935
|
+
$ affinidi login list-configs [--json] [--no-color]
|
|
709
936
|
|
|
710
|
-
|
|
937
|
+
GLOBAL FLAGS
|
|
938
|
+
--json Format output as json.
|
|
939
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
711
940
|
|
|
712
|
-
|
|
713
|
-
$ affinidi
|
|
714
|
-
$ affinidi show project --help
|
|
715
|
-
$ affinidi show schema --help
|
|
716
|
-
$ affinidi show user --help
|
|
941
|
+
EXAMPLES
|
|
942
|
+
$ affinidi login list-configs
|
|
717
943
|
```
|
|
718
944
|
|
|
719
|
-
|
|
945
|
+
## `affinidi login list-groups`
|
|
720
946
|
|
|
721
|
-
|
|
947
|
+
Lists user groups in your active project
|
|
722
948
|
|
|
949
|
+
```
|
|
723
950
|
USAGE
|
|
951
|
+
$ affinidi login list-groups [--json] [--no-color]
|
|
724
952
|
|
|
725
|
-
|
|
726
|
-
|
|
953
|
+
GLOBAL FLAGS
|
|
954
|
+
--json Format output as json.
|
|
955
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
956
|
+
|
|
957
|
+
EXAMPLES
|
|
958
|
+
$ affinidi login list-groups
|
|
727
959
|
```
|
|
728
960
|
|
|
729
|
-
|
|
961
|
+
## `affinidi login list-users-in-group`
|
|
962
|
+
|
|
963
|
+
Use this command to list users in the user group
|
|
730
964
|
|
|
731
965
|
```
|
|
732
|
-
|
|
733
|
-
|
|
966
|
+
USAGE
|
|
967
|
+
$ affinidi login list-users-in-group [--json] [--no-color] [--group-name <value>]
|
|
734
968
|
|
|
735
|
-
|
|
969
|
+
FLAGS
|
|
970
|
+
--group-name=<value> Name of the user group
|
|
736
971
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
972
|
+
GLOBAL FLAGS
|
|
973
|
+
--json Format output as json.
|
|
974
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
740
975
|
|
|
741
|
-
|
|
976
|
+
EXAMPLES
|
|
977
|
+
$ affinidi login list-users-in-group --group-name my_group
|
|
978
|
+
```
|
|
742
979
|
|
|
743
|
-
|
|
980
|
+
## `affinidi login remove-user-from-group`
|
|
744
981
|
|
|
745
|
-
|
|
982
|
+
Removes a user from a user group
|
|
746
983
|
|
|
747
984
|
```
|
|
748
|
-
|
|
749
|
-
|
|
985
|
+
USAGE
|
|
986
|
+
$ affinidi login remove-user-from-group [--json] [--no-color] [--group-name <value>] [--user-mapping-id <value>]
|
|
750
987
|
|
|
751
988
|
FLAGS
|
|
989
|
+
--group-name=<value> Name of the user group
|
|
990
|
+
--user-mapping-id=<value> ID of the user mapping record
|
|
752
991
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
992
|
+
GLOBAL FLAGS
|
|
993
|
+
--json Format output as json.
|
|
994
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
756
995
|
|
|
757
996
|
EXAMPLES
|
|
758
|
-
|
|
759
|
-
```
|
|
760
|
-
$ affinidi use project example-id
|
|
997
|
+
$ affinidi login remove-user-from-group --group-name my_group --user-mapping-id <value>
|
|
761
998
|
```
|
|
762
999
|
|
|
763
|
-
|
|
1000
|
+
## `affinidi login update-config`
|
|
1001
|
+
|
|
1002
|
+
Updates a login configuration
|
|
764
1003
|
|
|
765
1004
|
```
|
|
766
|
-
|
|
767
|
-
$ affinidi
|
|
768
|
-
|
|
1005
|
+
USAGE
|
|
1006
|
+
$ affinidi login update-config [--json] [--no-color] [-i <value>] [-f <value> | -n <value> | -u <value> |
|
|
1007
|
+
--token-endpoint-auth-method client_secret_basic|client_secret_post|none | --client-name <value> | --client-origin
|
|
1008
|
+
<value> | --client-logo <value>]
|
|
769
1009
|
|
|
770
|
-
|
|
1010
|
+
FLAGS
|
|
1011
|
+
-f, --file=<value> Location of a json file containing login configuration data
|
|
1012
|
+
-i, --id=<value> ID of the login configuration
|
|
1013
|
+
-n, --name=<value> Name of the login configuration
|
|
1014
|
+
-u, --redirect-uris=<value> OAuth 2.0 redirect URIs, separated by space
|
|
1015
|
+
--client-logo=<value> URL of a logo for the client, displayed in the consent page
|
|
1016
|
+
--client-name=<value> Name of the client, displayed in the consent page
|
|
1017
|
+
--client-origin=<value> Origin of the client, displayed in the consent page
|
|
1018
|
+
--token-endpoint-auth-method=<option> Client authentication method for the token endpoint. Defaults to
|
|
1019
|
+
client_secret_post
|
|
1020
|
+
<options: client_secret_basic|client_secret_post|none>
|
|
1021
|
+
|
|
1022
|
+
GLOBAL FLAGS
|
|
1023
|
+
--json Format output as json.
|
|
1024
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
771
1025
|
|
|
772
|
-
|
|
1026
|
+
EXAMPLES
|
|
1027
|
+
$ affinidi login update-config --id <value> -f loginConfig.json
|
|
773
1028
|
|
|
774
|
-
|
|
1029
|
+
$ affinidi login update-config --id <value> -u http://localhost:8080/callback
|
|
1030
|
+
|
|
1031
|
+
$ 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
|
|
1032
|
+
|
|
1033
|
+
FLAG DESCRIPTIONS
|
|
1034
|
+
--token-endpoint-auth-method=client_secret_basic|client_secret_post|none
|
|
775
1035
|
|
|
1036
|
+
Client authentication method for the token endpoint. Defaults to client_secret_post
|
|
1037
|
+
|
|
1038
|
+
The options are:
|
|
1039
|
+
client_secret_post: (default) Send client_id and client_secret as application/x-www-form-urlencoded in the HTTP body
|
|
1040
|
+
client_secret_basic: Send client_id and client_secret as application/x-www-form-urlencoded encoded in the HTTP
|
|
1041
|
+
Authorization header
|
|
1042
|
+
none: For public clients (native/mobile apps) which can not have a secret
|
|
776
1043
|
```
|
|
777
|
-
|
|
1044
|
+
|
|
1045
|
+
## `affinidi project create-project`
|
|
1046
|
+
|
|
1047
|
+
Creates a project
|
|
1048
|
+
|
|
778
1049
|
```
|
|
1050
|
+
USAGE
|
|
1051
|
+
$ affinidi project create-project [--json] [--no-color] [-n <value>]
|
|
779
1052
|
|
|
780
1053
|
FLAGS
|
|
1054
|
+
-n, --name=<value> Name of the project
|
|
781
1055
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
-
|
|
785
|
-
```
|
|
1056
|
+
GLOBAL FLAGS
|
|
1057
|
+
--json Format output as json.
|
|
1058
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
786
1059
|
|
|
787
1060
|
EXAMPLES
|
|
1061
|
+
$ affinidi project create-project -n MyProjectName
|
|
788
1062
|
|
|
789
|
-
|
|
790
|
-
$ affinidi verify-vc -d "/exampleVc.json"
|
|
1063
|
+
$ affinidi project create-project --name "My project name"
|
|
791
1064
|
```
|
|
792
1065
|
|
|
793
|
-
|
|
1066
|
+
## `affinidi project get-active-project`
|
|
1067
|
+
|
|
1068
|
+
Gets the current active project
|
|
794
1069
|
|
|
795
1070
|
```
|
|
796
|
-
|
|
797
|
-
|
|
1071
|
+
USAGE
|
|
1072
|
+
$ affinidi project get-active-project [--json] [--no-color]
|
|
798
1073
|
|
|
799
|
-
|
|
1074
|
+
GLOBAL FLAGS
|
|
1075
|
+
--json Format output as json.
|
|
1076
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
800
1077
|
|
|
801
|
-
|
|
1078
|
+
EXAMPLES
|
|
1079
|
+
$ affinidi project get-active-project
|
|
1080
|
+
```
|
|
802
1081
|
|
|
803
|
-
|
|
1082
|
+
## `affinidi project list-projects`
|
|
804
1083
|
|
|
805
|
-
|
|
1084
|
+
Lists your projects
|
|
806
1085
|
|
|
807
|
-
|
|
1086
|
+
```
|
|
1087
|
+
USAGE
|
|
1088
|
+
$ affinidi project list-projects [--json] [--no-color]
|
|
808
1089
|
|
|
809
|
-
|
|
1090
|
+
GLOBAL FLAGS
|
|
1091
|
+
--json Format output as json.
|
|
1092
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
810
1093
|
|
|
811
|
-
|
|
1094
|
+
EXAMPLES
|
|
1095
|
+
$ affinidi project list-projects
|
|
1096
|
+
```
|
|
812
1097
|
|
|
813
|
-
|
|
1098
|
+
## `affinidi project select-project`
|
|
814
1099
|
|
|
815
|
-
|
|
1100
|
+
Sets a project as the active project
|
|
816
1101
|
|
|
817
|
-
|
|
818
|
-
|
|
1102
|
+
```
|
|
1103
|
+
USAGE
|
|
1104
|
+
$ affinidi project select-project [--json] [--no-color] [-i <value>]
|
|
819
1105
|
|
|
820
|
-
|
|
1106
|
+
FLAGS
|
|
1107
|
+
-i, --project-id=<value> ID of the project
|
|
821
1108
|
|
|
822
|
-
|
|
823
|
-
|
|
1109
|
+
GLOBAL FLAGS
|
|
1110
|
+
--json Format output as json.
|
|
1111
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
824
1112
|
|
|
825
|
-
|
|
1113
|
+
EXAMPLES
|
|
1114
|
+
$ affinidi project select-project
|
|
826
1115
|
|
|
827
|
-
|
|
1116
|
+
$ affinidi project select-project -i <project-id>
|
|
828
1117
|
|
|
829
|
-
|
|
830
|
-
{
|
|
831
|
-
"type": "object",
|
|
832
|
-
"properties": {
|
|
833
|
-
"<propertyName>": {
|
|
834
|
-
"title": "<Property title>",
|
|
835
|
-
"type": "<Property type (see available attribites below)>",
|
|
836
|
-
"description": "<Property description>"
|
|
837
|
-
},
|
|
838
|
-
<other properties>
|
|
839
|
-
},
|
|
840
|
-
"required": [
|
|
841
|
-
<list of required properties>
|
|
842
|
-
]
|
|
843
|
-
}
|
|
1118
|
+
$ affinidi project select-project --project-id <project-id>
|
|
844
1119
|
```
|
|
845
1120
|
|
|
846
|
-
|
|
1121
|
+
## `affinidi search`
|
|
1122
|
+
|
|
1123
|
+
Search for a command.
|
|
847
1124
|
|
|
848
1125
|
```
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
"properties": {
|
|
852
|
-
"firstName": {
|
|
853
|
-
"title": "First Name",
|
|
854
|
-
"type": "string",
|
|
855
|
-
"description": "First name of a customer"
|
|
856
|
-
},
|
|
857
|
-
"lastName": {
|
|
858
|
-
"title": "Last Name",
|
|
859
|
-
"type": "string",
|
|
860
|
-
"description": "Last name of a customer"
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
"required": [
|
|
864
|
-
"lastName"
|
|
865
|
-
]
|
|
866
|
-
}
|
|
867
|
-
```
|
|
1126
|
+
USAGE
|
|
1127
|
+
$ affinidi search
|
|
868
1128
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
- Example of VC value: "did:example:123"
|
|
874
|
-
- Text – a string value
|
|
875
|
-
- Example of VC value: "my text"
|
|
876
|
-
- URI – a link to a web resource
|
|
877
|
-
- Example of VC value: "http://ui.schema.affinidi.com/"
|
|
878
|
-
- Date – a date (ISO 8601)
|
|
879
|
-
- Example of VC value: "2011-04-01"
|
|
880
|
-
- DateTime – a specific point in time (ISO 8601)
|
|
881
|
-
- Example of VC value: "2011-05-08T19:30"
|
|
882
|
-
- Number – a numerical value
|
|
883
|
-
- Example of VC value: 123.45
|
|
884
|
-
- Boolean – a boolean value
|
|
885
|
-
- Example of VC value: true or false
|
|
886
|
-
|
|
887
|
-
Example of schema source with all the types:
|
|
888
|
-
|
|
889
|
-
```json
|
|
890
|
-
{
|
|
891
|
-
"type": "object",
|
|
892
|
-
"properties": {
|
|
893
|
-
"nestedType": {
|
|
894
|
-
"title": "nestedType",
|
|
895
|
-
"type": "object",
|
|
896
|
-
"description": "Field with nested attributes",
|
|
897
|
-
"properties": {
|
|
898
|
-
"nestedTextType": {
|
|
899
|
-
"title": "nestedTextType",
|
|
900
|
-
"type": "string",
|
|
901
|
-
"description": "Nested text field "
|
|
902
|
-
}
|
|
903
|
-
},
|
|
904
|
-
"required": []
|
|
905
|
-
},
|
|
906
|
-
"didType": {
|
|
907
|
-
"title": "didType",
|
|
908
|
-
"type": "string",
|
|
909
|
-
"format": "did",
|
|
910
|
-
"description": "DID attribute"
|
|
911
|
-
},
|
|
912
|
-
"testType": {
|
|
913
|
-
"title": "testType",
|
|
914
|
-
"type": "string",
|
|
915
|
-
"description": "Text attribute"
|
|
916
|
-
},
|
|
917
|
-
"uriType": {
|
|
918
|
-
"title": "uriType",
|
|
919
|
-
"type": "string",
|
|
920
|
-
"format": "uri",
|
|
921
|
-
"description": "URI attribute"
|
|
922
|
-
},
|
|
923
|
-
"dateType": {
|
|
924
|
-
"title": "dateType",
|
|
925
|
-
"type": "string",
|
|
926
|
-
"format": "date",
|
|
927
|
-
"description": "Date attribute"
|
|
928
|
-
},
|
|
929
|
-
"dateTimeType": {
|
|
930
|
-
"title": "dateTimeType",
|
|
931
|
-
"type": "string",
|
|
932
|
-
"format": "date-time",
|
|
933
|
-
"description": "DateTime attribute"
|
|
934
|
-
},
|
|
935
|
-
"numberType": {
|
|
936
|
-
"title": "numberType",
|
|
937
|
-
"type": "number",
|
|
938
|
-
"description": "Number attribute"
|
|
939
|
-
},
|
|
940
|
-
"booleanType": {
|
|
941
|
-
"title": "booleanType",
|
|
942
|
-
"type": "boolean",
|
|
943
|
-
"description": "Boolean attribute"
|
|
944
|
-
}
|
|
945
|
-
},
|
|
946
|
-
"required": []
|
|
947
|
-
}
|
|
1129
|
+
DESCRIPTION
|
|
1130
|
+
Search for a command.
|
|
1131
|
+
|
|
1132
|
+
Once you select a command, hit enter and it will show the help for that command.
|
|
948
1133
|
```
|
|
949
1134
|
|
|
950
|
-
|
|
1135
|
+
_See code: [@oclif/plugin-search](https://github.com/oclif/plugin-search/blob/v0.0.22/dist/commands/search.ts)_
|
|
951
1136
|
|
|
952
|
-
|
|
1137
|
+
## `affinidi start`
|
|
953
1138
|
|
|
954
|
-
|
|
1139
|
+
Log in to Affinidi
|
|
955
1140
|
|
|
956
|
-
|
|
1141
|
+
```
|
|
1142
|
+
USAGE
|
|
1143
|
+
$ affinidi start [--json] [--no-color] [-i <value>]
|
|
957
1144
|
|
|
958
|
-
|
|
959
|
-
|
|
1145
|
+
FLAGS
|
|
1146
|
+
-i, --project-id=<value> ID of the project to set as active
|
|
960
1147
|
|
|
961
|
-
|
|
1148
|
+
GLOBAL FLAGS
|
|
1149
|
+
--json Format output as json.
|
|
1150
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
962
1151
|
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
1152
|
+
EXAMPLES
|
|
1153
|
+
$ affinidi start
|
|
1154
|
+
|
|
1155
|
+
$ affinidi start -i <project-id>
|
|
966
1156
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
and are maintained by the system in parallel.
|
|
970
|
-
However, you can always fork your private (unlisted) schema in order to make it public and vice versa.
|
|
1157
|
+
$ affinidi start --project-id <project-id>
|
|
1158
|
+
```
|
|
971
1159
|
|
|
972
|
-
|
|
1160
|
+
_See code: [dist/commands/start.ts](https://github.com/affinidi/affinidi-cli/blob/v2.0.0-beta.76/dist/commands/start.ts)_
|
|
973
1161
|
|
|
974
|
-
|
|
1162
|
+
## `affinidi stop`
|
|
975
1163
|
|
|
976
|
-
|
|
1164
|
+
Log out from Affinidi
|
|
977
1165
|
|
|
978
1166
|
```
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1167
|
+
USAGE
|
|
1168
|
+
$ affinidi stop [--json] [--no-color]
|
|
1169
|
+
|
|
1170
|
+
GLOBAL FLAGS
|
|
1171
|
+
--json Format output as json.
|
|
1172
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1173
|
+
|
|
1174
|
+
EXAMPLES
|
|
1175
|
+
$ affinidi stop
|
|
987
1176
|
```
|
|
988
1177
|
|
|
989
|
-
|
|
1178
|
+
_See code: [dist/commands/stop.ts](https://github.com/affinidi/affinidi-cli/blob/v2.0.0-beta.76/dist/commands/stop.ts)_
|
|
990
1179
|
|
|
991
|
-
|
|
1180
|
+
## `affinidi token create-token`
|
|
992
1181
|
|
|
993
|
-
|
|
1182
|
+
Creates a Personal Access Token (PAT)
|
|
994
1183
|
|
|
995
|
-
|
|
1184
|
+
```
|
|
1185
|
+
USAGE
|
|
1186
|
+
$ affinidi token create-token [--json] [--no-color] [-n <value>] [-k <value>] [-f <value>] [--algorithm
|
|
1187
|
+
RS256|RS512|ES256|ES512]
|
|
996
1188
|
|
|
997
|
-
|
|
1189
|
+
FLAGS
|
|
1190
|
+
-f, --public-key-file=<value> Location of the public key PEM file
|
|
1191
|
+
-k, --key-id=<value> Identifier of the key (kid)
|
|
1192
|
+
-n, --name=<value> Name of the Personal Access Token, at least 8 chars long
|
|
1193
|
+
--algorithm=<option> [default: RS256] The specific cryptographic algorithm used with the key
|
|
1194
|
+
<options: RS256|RS512|ES256|ES512>
|
|
998
1195
|
|
|
999
|
-
|
|
1196
|
+
GLOBAL FLAGS
|
|
1197
|
+
--json Format output as json.
|
|
1198
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1000
1199
|
|
|
1001
|
-
|
|
1200
|
+
EXAMPLES
|
|
1201
|
+
$ affinidi token create-token -n MyNewToken -k MyKeyID -f publicKey.pem
|
|
1002
1202
|
|
|
1003
|
-
|
|
1203
|
+
$ affinidi token create-token --name "My new token" --key-id MyKeyID --public-key-file publicKey.pem --algorithm RS256
|
|
1204
|
+
```
|
|
1004
1205
|
|
|
1005
|
-
|
|
1206
|
+
## `affinidi token delete-token`
|
|
1006
1207
|
|
|
1007
|
-
|
|
1208
|
+
Deletes a Personal Access Token (PAT)
|
|
1008
1209
|
|
|
1009
|
-
|
|
1210
|
+
```
|
|
1211
|
+
USAGE
|
|
1212
|
+
$ affinidi token delete-token [--json] [--no-color] [-i <value>]
|
|
1010
1213
|
|
|
1011
|
-
|
|
1214
|
+
FLAGS
|
|
1215
|
+
-i, --token-id=<value> ID of the Personal Access Token
|
|
1012
1216
|
|
|
1013
|
-
|
|
1217
|
+
GLOBAL FLAGS
|
|
1218
|
+
--json Format output as json.
|
|
1219
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1014
1220
|
|
|
1015
|
-
|
|
1221
|
+
EXAMPLES
|
|
1222
|
+
$ affinidi token delete-token -i <uuid>
|
|
1016
1223
|
|
|
1017
|
-
|
|
1224
|
+
$ affinidi token delete-token --token-id <uuid>
|
|
1225
|
+
```
|
|
1018
1226
|
|
|
1019
|
-
|
|
1227
|
+
## `affinidi token get-token`
|
|
1020
1228
|
|
|
1021
|
-
|
|
1229
|
+
Gets the details of a Personal Access Token (PAT)
|
|
1022
1230
|
|
|
1023
|
-
|
|
1231
|
+
```
|
|
1232
|
+
USAGE
|
|
1233
|
+
$ affinidi token get-token [--json] [--no-color] [-i <value>]
|
|
1024
1234
|
|
|
1025
|
-
|
|
1235
|
+
FLAGS
|
|
1236
|
+
-i, --token-id=<value> ID of the Personal Access Token
|
|
1026
1237
|
|
|
1027
|
-
|
|
1238
|
+
GLOBAL FLAGS
|
|
1239
|
+
--json Format output as json.
|
|
1240
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1028
1241
|
|
|
1029
|
-
|
|
1242
|
+
EXAMPLES
|
|
1243
|
+
$ affinidi token get-token -i <uuid>
|
|
1030
1244
|
|
|
1031
|
-
|
|
1245
|
+
$ affinidi token get-token --token-id <uuid>
|
|
1246
|
+
```
|
|
1032
1247
|
|
|
1033
|
-
|
|
1248
|
+
## `affinidi token list-tokens`
|
|
1034
1249
|
|
|
1035
|
-
|
|
1250
|
+
Lists your Personal Access Tokens (PATs)
|
|
1036
1251
|
|
|
1037
|
-
|
|
1252
|
+
```
|
|
1253
|
+
USAGE
|
|
1254
|
+
$ affinidi token list-tokens [--json] [--no-color]
|
|
1038
1255
|
|
|
1039
|
-
|
|
1256
|
+
GLOBAL FLAGS
|
|
1257
|
+
--json Format output as json.
|
|
1258
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1040
1259
|
|
|
1041
|
-
|
|
1260
|
+
EXAMPLES
|
|
1261
|
+
$ affinidi token list-tokens
|
|
1262
|
+
```
|
|
1263
|
+
|
|
1264
|
+
## `affinidi token update-token`
|
|
1265
|
+
|
|
1266
|
+
Updates a Personal Access Token (PAT)
|
|
1042
1267
|
|
|
1043
|
-
|
|
1268
|
+
```
|
|
1269
|
+
USAGE
|
|
1270
|
+
$ affinidi token update-token [--json] [--no-color] [-i <value>] [-n <value>] [-k <value>] [-f <value>] [--algorithm
|
|
1271
|
+
RS256|RS512|ES256|ES512]
|
|
1044
1272
|
|
|
1045
|
-
|
|
1046
|
-
|
|
1273
|
+
FLAGS
|
|
1274
|
+
-f, --public-key-file=<value> Location of the public key PEM file
|
|
1275
|
+
-i, --token-id=<value> ID of the Personal Access Token
|
|
1276
|
+
-k, --key-id=<value> Identifier of the key (kid)
|
|
1277
|
+
-n, --name=<value> Name of the Personal Access Token, at least 8 chars long
|
|
1278
|
+
--algorithm=<option> [default: RS256] The specific cryptographic algorithm used with the key
|
|
1279
|
+
<options: RS256|RS512|ES256|ES512>
|
|
1280
|
+
|
|
1281
|
+
GLOBAL FLAGS
|
|
1282
|
+
--json Format output as json.
|
|
1283
|
+
--no-color Disables color in the output. If you have trouble distinguishing colors, consider using this flag.
|
|
1284
|
+
|
|
1285
|
+
EXAMPLES
|
|
1286
|
+
$ affinidi token update-token -i <uuid> -n MyNewToken -k MyKeyID -f publicKey.pem
|
|
1287
|
+
|
|
1288
|
+
$ affinidi token update-token --token-id <uuid> --name "My new token" --key-id "My key ID" --public-key-file publicKey.pem --algorithm RS256
|
|
1289
|
+
```
|
|
1290
|
+
<!-- commandsstop -->
|