http://localhost:3000/auth/github?clientId=1
curl -X GET http://localhost:3000/api/github/authentications/
# Should return something like:
#
# {
# "id": "....",
# "object": "authentication",
# "...": "..."
# }
#
curl -X DELETE http://localhost:3000/api/github/authentications/
# Should return something like:
#
# { "message": "Authentication removed" }
#
curl -X POST http://localhost:3000/api/github/configurations \
-H "Content-Type: application/json" \
-d '{"credentials": { "clientId": "...", "clientSecret": "..." }}'
# Should return something like:
#
# {
# "message": "Configuration registered",
# "configuration": {
# "id": "....",
# "object": "configuration",
# "...": "..."
# }
# }
#
curl -X GET http://localhost:3000/api/github/configurations/72184458-7751-41fe-8dcc-0251ab2cc578
# Should return something like:
#
# {
# "id": "....",
# "object": "configuration",
# "credentials": { "clientId": "...", "clientSecret": "..." }
# "scopes": ["..."]
# }
#
curl -X PUT http://localhost:3000/api/github/configurations/72184458-7751-41fe-8dcc-0251ab2cc578 \
-H "Content-Type: application/json" \
-d '{"credentials": { "clientId": "new_id", "clientSecret": "..." }}'
# Should return something like:
#
# { "message": "Configuration updated" }
#
curl -X DELETE http://localhost:3000/api/github/configurations/72184458-7751-41fe-8dcc-0251ab2cc578 \
# Should return something like:
#
# { "message": "Configuration removed" }
#
Deploy it to Heroku and test it.
Once deployed, go to the heroku application and perform an API call.