Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Solution overview

Yashraj Mungale edited this page Mar 20, 2020 · 13 revisions

Badgr integration

  • Application leverages Badgr APIs for user authentication and managing user badges. Additional information on Badgr can be found here

  • Badgr follow OAuth2.0 authentication mechanism which is also supported by Azure bot OAuth connection providers.

  • App connects with Azure key vault to access Badgr owner account details (it is recommended to use service account which has owner permission in issuer group).

Open Badges app template integrates with Badgr site to provide ability in Microsoft Teams to create badges, award them to team members and view badges received. It has following personas

  1. Owner – can add/remove members and badges along with awarding badges to members

  2. Editor - can create badge and award badges to user.

  3. Staff members – can view and award badges provided in an issuer group

Azure solution

  • The app service implements the Bot experience by providing end points for user communication. The app service hosts the react app in order to Award and list user badges in task module.

  • App endpoint is registered as messaging end point in bot registration portal and provides an endpoint /api/messages to process bot requests/response.

  • App service hosts React application for task module and provides custom APIs in back end to call API.

  • The HTML based task modules are authorized by using a custom JWT created by app using user id, service URL and unique signing keys.

  • Badgr: Application leverages Badgr REST APIs to show and award badges. All API calls are done from app service backend using access token.

  • Application reads the team members from roster to select team members while awarding badges

Badgr APIs

Open Badges leverages below Badgr APIs for authorization and various scenarios.

Use-case Endpoint
Get user profile https://api.badgr.io/v2/users/self
Base Url https://api.badgr.io
Get issuer https://api.badgr.io/v2/issuers/issuerentityId
Get earner badges https://api.badgr.io/v1/earner/badges
Award badge to users https://api.badgr.io/v1/issuer/issuers/{issuerentityId}/badges/{BadgeClassId}/batchAssertions
Get issuer group detail https://api.badgr.io/v2/issuers/issuerentityId
Add user in issuer group https://api.badgr.io/v1/issuer/issuers/{issuerentityId}/staff
Get user access token https://api.badgr.io/v2/auth/tokens
Revoke user access token https://api.badgr.io/v2/auth/tokens/entityid
Clone this wiki locally