Fun-fair autoscooter-ticket-generator. You want to ride scooter? Get a ticket.
Unreliable sometimes.
- Simple string-shaped
- linked to a "autoscooter"
- expire after short period
- signed
Generates a new ticket for a autoscooter:
http POST http://localhost:3000/tickets/generate autoscooter=karl
ticket=$(http POST http://localhost:3000/tickets/generate autoscooter=karl | jq -r ".ticket")
Validates a previously received ticket:
http POST http://localhost:3000/tickets/validate ticket="$ticket"
Used in learning/demo applications as external system that needs to be integrated as part of the workflow. Error handling should be an essential part here, as the system will occaionally produce errors on purpose.