This is a simple microservice for generating tokens and checking their validity.
Edited config file ./config/server.json
(listen port, expired live token (sec), TLS on/off, pki cert and key files )
go build ./cmd/main.go
main(windows main.exe) --config-path="/path-config/server.json"
default settings http://127.0.0.1:8080, expireted live after 600 sec
Documentation http://localhost:8080/docs
-
Request POST: /new
{ "name": string }
-
Response POST:
{ "token": string }
-
Request POST: /check
{ "token": string }
-
Response POST:
{ "valid": bool }
-
Request POST: /info
{ "token": string }
-
Response POST:
{ "token": string, "name": string }
docker pull skiphead/web-token-server:latest
Stable work on GoLang 1.8.3