This repository is my try to translate OAuth 2 in Action source code into Go.
https://www.manning.com/books/oauth-2-in-action
- Go 1.17
- WAF: Gin
- DB: Redis
- Others:
- oauth2
- NOTE: To understand detailed internal implementation, this repository does not use some useful features of this package
- oauth2
- File Watcher: Air
Execute 'make install-tools' at the root directory to install necessary tools.
Install useful tools
$ make install-toolsStart up redis
$ make start-redisThe 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 |
