Categorygithub.com/sondrefjellving/chirpy
repositorypackage
0.0.0-20240720070901-dd7ee6639522
Repository: https://github.com/sondrefjellving/chirpy.git
Documentation: pkg.go.dev

# README

Chirpy API

This project was built using a guide from boot.dev. Chirpy is a social network where you can create a user, log in using its credentials and publish posts.

Goal / Motivation

The goal of the project was to build an API in the Go programming language and learn authentication, authorization and webhooks.

Overview

Some of the endpoints requires access tokens or refresh tokens to authenticate the user. Data is stored by reading and writing to a local file that gets created upon application startup. A made up third-party service called "Polka" is used to experiment how webhooks are made. To verify that it is the Polka that "sends" the webhook, an API-key is used in the auth-header of the request. The API-key is then compared to a secret that is stored locally before proceeding.