The API should have the following functionality for the terraform-hashicups-provider. The terraform-hashicups-provider will be modeled after the terraform-provider-dominos and be used to teach practitioners how to create new Terraform providers and hack existing providers.
JWT Token
Any endpoint that needs auth must have this header: Authorization: Bearer <token>. It will be a JWT token containing the user_id, username, and the token expiration date.
The API should have the following functionality for the
terraform-hashicups-provider
. Theterraform-hashicups-provider
will be modeled after the terraform-provider-dominos and be used to teach practitioners how to create new Terraform providers and hack existing providers.JWT Token
Any endpoint that needs auth must have this header:
Authorization: Bearer <token>
. It will be a JWT token containing the user_id, username, and the token expiration date.Endpoints
POST
/signup
{'username': '', 'password': '' }
POST
/signin
{'username': '', 'password': '' }
POST
/orders
- needs auth{ 'order': [ { 'coffee_id': '', 'quantity': ''} ] }
GET
/orders
- needs auth{ 'orders': [ { 'order_id': '', 'datetime': ''} ] }
GET
/orders/{id}
- needs authPUT
/orders/{id}
- needs auth{ 'order': [ { 'coffee_id': '', 'quantity': ''} ] }
DELETE
/orders/{id}
- needs auth