You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
I am thinking about how to write an updated make your own badges by hand blog post for the 1.0 specification, and realized that it would be a whole lot easier to give someone a badge if you could just give them a link to pushing it to their backpack, rather than learning how to use the JS Issuer API or giving a baked PNG to a confused user.
One way to do this is by simply defining a HTTP GET endpoint that takes query string arguments specifying assertion(s) and presents the user with a standard badge acceptance UI.
Here's a very simple proof of concept, which takes all assertion URLs named by one or more assertion key-value pairs in the querystring and passes them to the non-modal issuer API. Hosting this page at a documented endpoint on the backpack would make it possible for "push to backpack" buttons to be present on pages as standard hyperlinks, rather than requiring JS. They also enable issuers to simply email/instant-message/SMS a link that directly prompts the recipient to push the badge to their backpack, without requiring any intermediaries.
This solution should work okay in the federated backpack world, too, since the GET endpoint could simply do the same discovery rigamarole that the Issuer JS API does when accessed.
<!DOCTYPE html><metacharset="utf-8"><title>Easy Openbadge Issuer</title><pid="error" style="display: none">Error, no assertions found in
querystring.</p><scriptsrc="http://backpack.openbadges.org/issuer.js"></script><script>functiongetQueryVars(){varresult={};varquery=window.location.search.substring(1);varvars=query.split('&');for(vari=0;i<vars.length;i++){varpair=vars[i].split('=');varname=decodeURIComponent(pair[0]);varvalue=decodeURIComponent(pair[1]);if(!result[name])result[name]=[];result[name].push(value);}returnresult;}varassertions=getQueryVars().assertion;if(assertions)OpenBadges.issue_no_modal(assertions);elsedocument.getElementById("error").style.display="block";</script>
The text was updated successfully, but these errors were encountered:
Additionally, hosting a simple form that would allow issuers to paste in an assertion URL and get back a push-to-backpack URL that they could email the recipient would be useful. This would simply take care of automatically URL-encoding the assertion URL as a querystring argument to the GET endpoint.
This assumes that issuers are okay with pushing badges to the backpack with no success/failure feedback, which I think is completely true in the "make your own badges by hand" blogpost reader case. I just want to be clear that this doesn't fully replace the JS Issuer API call, since it allows the issuer to pass in a callback to get back information about the push results.
With that disclaimer, I think this is a cool idea! I think we should do it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am thinking about how to write an updated make your own badges by hand blog post for the 1.0 specification, and realized that it would be a whole lot easier to give someone a badge if you could just give them a link to pushing it to their backpack, rather than learning how to use the JS Issuer API or giving a baked PNG to a confused user.
One way to do this is by simply defining a HTTP GET endpoint that takes query string arguments specifying assertion(s) and presents the user with a standard badge acceptance UI.
Here's a very simple proof of concept, which takes all assertion URLs named by one or more
assertion
key-value pairs in the querystring and passes them to the non-modal issuer API. Hosting this page at a documented endpoint on the backpack would make it possible for "push to backpack" buttons to be present on pages as standard hyperlinks, rather than requiring JS. They also enable issuers to simply email/instant-message/SMS a link that directly prompts the recipient to push the badge to their backpack, without requiring any intermediaries.This solution should work okay in the federated backpack world, too, since the GET endpoint could simply do the same discovery rigamarole that the Issuer JS API does when accessed.
The text was updated successfully, but these errors were encountered: