https://github.com/huangsam/keyauth
Golang server that manages API keys for authenticated users
https://github.com/huangsam/keyauth
golang rest-api security
Last synced: 7 months ago
JSON representation
Golang server that manages API keys for authenticated users
- Host: GitHub
- URL: https://github.com/huangsam/keyauth
- Owner: huangsam
- License: mit
- Created: 2018-04-03T04:54:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-25T07:35:05.000Z (over 6 years ago)
- Last Synced: 2025-01-14T21:48:59.507Z (9 months ago)
- Topics: golang, rest-api, security
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keyauth
Golang server that manages API keys for authenticated users
## Getting started
### Package installation
First download the dependencies:
export GOPATH="..."
go get github.com/gorilla/handlers
go get github.com/gorilla/mux
go install### Server startup
Then run the main package:
keyauth
Access the server from port 3000 using your client of choice.
## Developers
### Test suite
The server was tested at the following key endpoints:
- `/`
- `/health/`
- `/api/apikey/`More endpoints can be tested in the future. To run the suite:
go test
### Implementation Notes
Some things to consider:
- Closely resembles the folder structure [here](https://github.com/qiangxue/golang-restful-starter-kit)
- Currently does not use database connections
- Uses a fake data structure to act as a database
- CORS is properly enabled for the API