# README
OAuth in Action in Go
This repository is my try to translate OAuth 2 in Action source code into Go.
https://www.manning.com/books/oauth-2-in-action
Requirement
- Go 1.17
Libraries
- WAF: Gin
- DB: Redis
- Others:
- oauth2
- NOTE: To understand detailed internal implementation, this repository does not use some useful features of this package
- oauth2
Tools
- File Watcher: Air
Execute 'make install-tools' at the root directory to install necessary tools.
Setup
Install useful tools
$ make install-tools
Start up redis
$ make start-redis
How to Use
The folder structure is quite similar to OAuth 2 in Action, but the entry points for authorization, client and protected resource servers are under each folder.
You should execute 'air' of 'go run main.go' command under each folder in cmd.
Ports are all same with the original repository, except for redis which replace over nosql.
server | port |
---|---|
authorization | 9001 |
client | 9000 |
protected resource | 9002 |
redis | 6379 |