Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 1.46 KB

README.md

File metadata and controls

60 lines (48 loc) · 1.46 KB

Checkpoint

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.

What do you learn from this project?

  • Middlewares in Golang
  • JWT
  • Airbrake

What is JWT?

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.

What is Airbrake?

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.

How to use?

Clone the project and enter the following command:

go run main.go

Endpoints

  • /api/login
    • method = POST
    • input: username, password
  • /api/register
    • method = POST
    • input: username, password
  • /api/user
    • method = GET
    • input: username, token [header]

Monitoring

Using airbrake dashboard to monitor our project: