See
JSKOS Server
for a canonical implementation of JSKOS API!