1.0.0-beta.7 • Published 7 months ago

@vckit/revocationlist v1.0.0-beta.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

Revocation list 2020

The revocation list 2020 plugin is used to revoke and verify the verify credential based on the revocation list 2020 https://w3c-ccg.github.io/vc-status-rl-2020/

Usage

Configuration

To use the plugin you need to add the following configuration to the agent.yml

  • First, define the revocation list plugin:
dbConnectionRevocationList:
  $require: typeorm#DataSource
  $args:
    - type: sqlite
      database:
        $ref: /constants/databaseFile
      synchronize: true
      migrationsRun: true
      migrations:
        $require: '@vckit/revocationlist?t=object#migrations'
      logging: false
      entities:
        $require: '@vckit/revocationlist?t=object#Entities'

revocationList:
  $require: '@vckit/revocationlist#RevocationStatus2020'
  $args:
    - dbConnection:
        $ref: /dbConnectionRevocationList
      revocationListPath: http://localhost:3332
      bitStringLength: 8
  • Second, add the plugin and credential status plugin to the agent plugins list:
agent:
  $require: '@vckit/core#Agent'
  $args:
    - schemaValidation: false
      plugins:
        # Plugins
        - $ref: /revocationList
        - $require: '@veramo/credential-status#CredentialStatusPlugin'
          $args:
            - RevocationList2020Status:
                $require: '@vckit/revocationlist?t=object#checkStatus'
  • Then, set the revocation list middleware to inject the credential status to the credential when it is issued:
- $require: '@vckit/revocationlist?t=function#revocationList2020'
  $args:
    - apiRoutes:
        - /routeCreationVerifiableCredential
      supportedProofFormats:
        - jwt
        - lds
  • After that, you need to expose the plugin functions:
- revokeCredential
- activateCredential
- checkStatus

Every time the credential is issued by API /routeCreationVerifiableCredential, the middleware will inject the credential status to the credential.