Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Tools for validating openbadges assertions
JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
LICENSE
Makefile
README.md
index.js
package.json

README.md

OpenBadges Validator Tools Build Status

Installing

$ npm install openbadges-validator

Usage

validator(assertionOrSignature, callback)

Validate a badge assertion and return an object containing info about the validated assertion.

The callback is passed two arguments, (err, info).

info is an object containing the following properties:

  • version: Version of the specification that the analyzed assertion corresponds to. Currently this will be either "1.0.0" or "0.5.0".
  • signature: JSON Web Signature representation of the assertion. This will only be present if the assertion came in as a JWS.
  • assertion: The assertion data
  • badge: Badge data related to assertion.
  • issuer: Issuer data related to badge.
  • resources: Object with all of the resources related to the assertion, badge and issuer. A list of the possible properties follows (properties marked with a star are guaranteed to exist. NOTE, property names are the literal dotted strings, not deep property lookups, i.e, resources['assertion.image'].
    • assertion.image
    • assertion.verify.url
    • assertion.evidence
    • badge.criteria
    • badge.image
    • issuer.url
    • issuer.image
    • issuer.revocationList

License

MPL 2.0

Something went wrong with that request. Please try again.