Verify a username-password combination and get a new JWT on success. username
and password
are passed as query parameters.
POST /authenticate
curl http://127.0.0.1:8000/authenticate?username=a\&password=123456
Verify that a token is (still) valid. This returns 200 if the token is valid and 401 if it's not. A HTTP 400 status is returned when the token cannot be parsed.
POST /verify/<token>
curl -v -X POST http://127.0.0.1:8000/verify/eyJ0eXAiOiJKV1QiLCJraWQiOm51bGwsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJzY2hhbmktcnMiLCJzdWIiOiJ0ZXN0IiwiYXVkIjpudWxsLCJleHAiOm51bGwsIm5iZiI6bnVsbCwiaWF0IjpudWxsLCJqdGkiOm51bGx9.U40p4ITqOFW9jdurBbHDyGoQxkR0y3unwMiifntWMOc