Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ma91n/airac
πͺπππAuth Identify Resource and Access Controller
https://github.com/ma91n/airac
go golang oauth
Last synced: 6 days ago
JSON representation
πͺπππAuth Identify Resource and Access Controller
- Host: GitHub
- URL: https://github.com/ma91n/airac
- Owner: ma91n
- License: apache-2.0
- Created: 2019-08-11T04:43:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-15T10:26:06.000Z (over 5 years ago)
- Last Synced: 2023-04-03T21:56:06.688Z (over 1 year ago)
- Topics: go, golang, oauth
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# airac
Auth Identify Resource and Access Controller## API Spec
// TODO
## Configurations
### Windows
Get clientID and Secret Key each applications.
* [Google]()
* [Twitter]()
* Permissions > Access permission > check "Read-only"
* Permissions > Additional permissions > check on "Request email address from users"
* [Facebook]()
* [GitHub](https://github.com/settings/apps/new)
* User authorization callback URL > "http://localhost:8000/github/callback"
* User permissions > check on "User permissions" Access Read-only
* Where can this GitHub App be installed? > Any accountCreate Keys
1. ssh-keygen -t rsa
* example) file name is `demo`
2. ssh-keygen -f demo.rsa.pub -e -m pkcs8 > demo.rsa.pub.pkcs8Set environment variables.
```sh
# Google Client ID
set GOOGLE_CLIENT_ID=
set GOOGLE_CLIENT_SECRET=# Twitter Consumer API keys
set TWITTER_CONSUMER_KEY=
set TWITTER_CONSUMER_SECRET=
set FACEBOOK_CLIENT_ID=
set FACEBOOK_CLIENT_SECRET=# GitHub
set GITHUB_CLIENT_ID=
set GITHUB_CLIENT_SECRET=# PublicKey & SecretKey
set PRIVATE_KEY_PATH=
set PUBLIC_KEY_PATH=# Optional(default 8000)
set PORT=8000
```### Mac/Linux
TODO
## Developer Guide
### Required
* go 1.12+
### Setup
1. git clone http://github.com/laqiiz/airac
2. cd airac
3. go mod download
4. go run main.go
5. curl http://localhost:8080/health
* confirming return `ok`### Install git pre-commit hook script before developing.
```bash
# Windows
cd airac
copy /Y .\.githooks\*.* .\.git\hooks# Mac/Linux
cd airac
cp .githooks/* .git/hooks
chmod +x .git/hooks/pre-commit
```### Build
Binary for Linux
```sh
# on Linux
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-s -w' -a -installsuffix cgo -o main main.go# on Windows
set GOOS=linux
set GOARCH=amd64
set CGO_ENABLED=0
go build -ldflags "-s -w" -a -installsuffix cgo -o main main.go
```Docker
```sh
docker build -t airac .
docker run airac
```### Hot Reload
1. Install
* `go get github.com/pilu/fresh`
* `go mod tidy`
2. Run
* `fresh` instead of go run main.go## License
This project is licensed under the Apache License 2.0 License - see the [LICENSE](LICENSE) file for details