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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
install bedrock-issuer
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:
CREDENTIAL_ISSUE
permission for the
resource specified as the issuer
property in the credential
. See
bedrock-permission and bedrock-identity for more information.issuer
identifier, an
issued
date, and a claim
section with at least one claim.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.
The claim( actor, id, callback ) call will mark a previously
issued credential as claimed
in the database.
The call takes the following arguments:
CREDENTIAL_CLAIM
permission for the
resource specified in credential.claim.id
. See bedrock-permission and
bedrock-identity for more information.unclaimed
.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