A badge issuing service for rc3.world where you have to find a certain amount of places to receive a badge.
howto | ||
counterbadge.example.json | ||
counterbadge.py | ||
counterbadge.service | ||
LICENSE | ||
README.md |
rC3 Counter-Badge
This project was created during rC3 2021 NOWHERE in order to issue badges (i.e. achievements) for a treasure hunt style game on a WorkAdventure map.
License
See LICENSE
Dependencies
- Python 3 >= 3.6
- Bottle
- Beaker
How To Set Up
Create your Badges in Maschinenraum
- Click the
+
button next to theBadges
menu entry - Give you badge a name
- Make the badge an achievement
- Upload a badge picture
- Save the badge
Repeat for every badge you want to create.
Issue Badge Redeem Tokens
- Click on the
Badges
menu entry - Select your badge
- Under
Create Badge Redeem Tokens
, choose thePermanent
type. - Click Create Redeem Token. Save the redeem token for later use.
Repeat for every badge you want to create.
Create OAuth2 Client
- Click on the
Authentication
menu entry - If not already done, create a rC3 API token by clicking
Request a new token
. *Save the API token for later use. - Give your new OAuth2 client a name.
- Set its type to
Public
. - Set the grant type to
Auhtoziation code
. - Click
New application
to create the OAuth2 client.
Generate Counter Tokens
- For each unique place on your WorkAdventure map, generate a unique token, e.g. using
uuidgen
. - Create a layer in Tiled for each unique place and add at least the
openWebsite
layer property with a value of e.g.https://<yourdomain>/counter/<my-counter-name>/<the-unique-token>
.
Deploy
Set up counterbadge.py as a service on your system, e.g. as a systemd
service (see counterbadge.service
as an example). Set up a
TLS-terminating reverse proxy.
Configure
See counterbadge.example.json
as a config example. Put in the API, OAuth2 and Badge credentials you created earlier.