Using JWT to authenticate the users of a web-application. The main idea behind this project was to authorize our clients in a Golang service using JWT.
- Middlewares in Golang
- JWT
- Airbrake
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.
This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.
Read more about JWT.
Airbrake is the world's leading error tracking service. Thousands of engineering teams all over the world use Airbrake to capture, organize and alert their software exceptions, allowing them to find and fix bugs more quickly.
Read more about Airbrake.
Clone the project and enter the following command:
go run main.go
- /api/login
- method = POST
- input: username, password
- /api/register
- method = POST
- input: username, password
- /api/user
- method = GET
- input: username, token [header]