Ginger module for performing actions as a result of scanning RFID tags.
Features:
- API for outside registering RFIDs and actions performed with RFIDs
- admin web interface for administering RFIDs
You need to be authenticated with an OAuth2 client access token to perform API calls. See mod_oauth2 on how to obtain such a token.
Get user that an RFID belongs to:
GET /rfids/{id} HTTP/1.1
Authorization: Bearer {Client OAuth2 token}
Attach a RFID to a user. This requires a user access token:
POST /me/rfids HTTP/1.1
Authorization: Bearer {User OAuth2 token}
Content-Type: application/json
Accept: application/json
{
"rfids": [
"AB123456",
"XZ987654"
]
}
When an RFID tag has been scanned, report that action to the Tagger API. You can attach any file contents either as a base64-encoded string in a JSON body or as a multipart/form element.
As JSON body:
POST /tagger/actions
Authorization: Bearer {Client OAuth2 token}
Content-Type: application/json
Accept: application/json
{
"rfids": [
"ABC12345",
"DEF78901"
],
"attachment": "base64-encoded image contents"
}
You also override the default object by specifying its id or URI:
POST /tagger/actions
Authorization: Bearer {Client OAuth2 token}
Content-Type: application/json
Accept: application/json
{
"rfids": [
"ABC12345"
],
"object_id": "http://yoursite.com/
}
All users that have ACL use rights on mod_admin_identity will see an RFID section in the admin’s person sidebar.