Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Open Badge Baking Specification

Brian J Brennan edited this page Jul 23, 2012 · 8 revisions

WORK IN PROGRESS.

version 2

PNGs

Baking

See http://www.w3.org/TR/PNG/#11iTXt for more information on how to properly create an iTXt chunk.

Data MUST be in the form of serialized JSON. The following fields are REQUIRED:

  • method: Verification method of the badge. Currently the only defined value in this specification is “hosted”. Value is case-insensitive.
  • assertionUrl: URL where the assertion is hosted. SHOULD ensure validity of badge before baking.

The following fields are OPTIONAL

  • version: Version of the OpenBadge Baking Specification. This may be supplied as assistance to decoders.
  • timestamp: Unix timestamp representing the time of baking.
  • assertionHash: Hashed representation of the contents at “assertionUrl”. This can be used to verify that the badge assertion has not changed since the time of baking. If provided, MUST be in the form of “$”, e.g., “sha256$98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4”.

The serialized JSON MUST be stored in the iTXt chunk with the keyword “openbadge”. An image MUST NOT have more than one iTXt chunk with the “openbadge” keyword.

Language tag SHOULD be “json”. Tag is case-insensitive.

Data MAY be compressed. The only compression scheme supported by the PNG specification is zlib inflate/deflate.

Translated keyword SHOULD be blank.

Psuedo-example

Keyword: 'openbadge'
<null separator>
Compression flag: 0
Compression method: 0
Language tag: 'json'
<null separator>
Translated keyword: ''
<null separator>
Text: '{"method": "hosted", "assertionUrl": "http://example.com/badge.json"}'
Clone this wiki locally