-
Notifications
You must be signed in to change notification settings - Fork 259
Assertions
In the future we will support signed assertions, which will mean signing a badge assertion with your private key and hosting a public key at a well known, public URL. In the even more distant future, we will probably try to support DNSSEC for public key discovery. For now, we only support Hosted Assertions.
A hosted assertion is a file containing well-formatted JSON served with the
content-type application/json.
Do this before doing anything that starts a response (echo, print, etc.)
header('Content-Type: application/json');badge_manifest_json should be already be a JSON string.
HttpResponse(badge_manifest_json, mimetype='application/json')badge_manifest is your hash containing the badge data. This will
automatically convert it to JSON for you.
render :json => badge_manifestIf you're hosting your assertions statically, save them as .json files and add the following line to your httpd.conf
AddType application/json jsonIn your server context, add the following:
types {
applications/json json;
}Read http://wiki.nginx.org/HttpCoreModule#types for more information.