In Badges I described a badge manager infrastructure I was planning, centered on the Mozilla Open Badges. There a quite a lot of components involved. I'll be showing the latest pieces I'm working on here, and welcome any input, collaboration, assistance, comments and criticisim through our forum.
I'm issuing badges! There are still a few small issues to overcome as below, but it's working.
Open Badge Backpacks are accessible through the persona authentication system. I found the documentation about this pretty unfathomable, but searching around, I've been able to find out what was needed to get authenticated to persona. I need to be able to access the Mozilla backpack, since I'm using this as my source of truth for what badges any individual has earned, and I also want to be able to issue a badge to that backpack when earned.
This persona object watches for changes in persona login/logout status. To action that status change, I'm calling a login or logout function, hosted on my server. On a successful login, I get the email address, convert the email to a mozilla open badges ID, and retrieve all backpack public groups that this user has created. We also update the page with who is logged in, and change the login button to a logout one.
Here's how to login - it needs to be server based, so I've used PHP. While we're at, we'll also return the Mozzilla Open Badges UserID associated with this email address.
I'm using the standard css for styling persona login buttons
Because the Mozilla badge issuer doesn't like cross domain requests, I have to use a php proxy to actually issue badges