Node.js server using OpenBadgeFactory API
- Node.js v9+
- OpenSSL
Generate your certificate signing request token in Admin tools → API key, use your certificate in OBF_CERT (environment variable) and run this command :
$ npm run conf
$ docker-compose up
- port : Application port
- urlApi : OpenBadgeFactory API
- email :
- subject : Email subject
- body : Email content, :recipientName var replace by user's email
- button : Text displayed on the badge recovery button
- footer : Text displayed in email footer
- logEntry :
- client : Name of the badge-issuing application
- issuer : Issuer name
- mongo :
- host : Database host
- port : Database port
- db : Database name
- authority : Authority name used to set licence in a badge
- cacheTime : Time in hours to regenerate cache from server launch
- continuousIntegration : Allow to launch the server without the certificates presence
URL | Action | Request body |
---|---|---|
GET / | Give the name and version of the application | |
GET /ping | Ping OpenBadgeFactory API | |
GET /metrics | Get total issuances by badge | |
GET /metrics/count | Get count of badges | |
GET /badges | Get user's badges | Query String
|
POST /badges/emit | Emits badge for user | JSON
|
PUT /badges/visibility | Change visibility user | JSON
|
GET /share/:type/:uuid/:locale | Display issued badge's page | HTML
|