digitalbazaar/bedrock-issuer

Name: bedrock-issuer

Owner: Digital Bazaar, Inc.

Description: No frills credential issuance

Created: 2015-05-07 21:55:14.0

Updated: 2016-01-31 23:47:01.0

Pushed: 2017-04-04 17:22:51.0

Homepage: null

Size: 156

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

bedrock-issuer

Build Status

This is a bedrock-based library that provides a simple JavaScript and HTTP API for issuing and claiming JSON-LD credentials and storing them in a database. It is not a comprehensive credential issuer application, rather it can be integrated into such an application to provide some portion of its required features.

Requirements
Quick Examples
install bedrock-issuer
Issuing a credential

The issue( actor, credential, [options], callback ) call will issue a credential by digitally signing it and storing it in an unclaimed state in the database.

The call takes the following arguments:

Note: At present, the key used to sign the credential must have been previously registered with the issuer of the credential as their preferred credential signing key (identity.sysPreferences.credentialSigningKey). A future option will be added to allow an identifier for the signing key to be specified via options.

issuer = require('bedrock-issuer');

igitally-sign and issue a credential for later claiming
er.issue(actor, credential, {
ivateKey: key,
blicKeyId: publicKeyId
unction(err, signed) {
(err) {
console.log('uh oh', err);
return;

 `signed` is the signed credential

Credentials may also be issued via the HTTP API. By posting an unsigned JSON-LD credential to the endpoint configured via bedrock.config.issuer.endpoints.unsignedCredential, along with the appropriate authentication, the above issue call can be called internally using the authenticated identity and the parsed credential.

Claiming a credential (marking it as claimed)

The claim( actor, id, callback ) call will mark a previously issued credential as claimed in the database.

The call takes the following arguments:

issuer = require('bedrock-issuer');

ark a credential as claimed
er.claim(actor, credentialId, function(err) {
(err) {
console.log('uh oh', err);
return;

 successfully claimed credential


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.