oauth2_code
v0.0.8
Published
Reverse proxy for oauth2 code authorization
Downloads
6
Readme
oauth2_code
Reverse proxy for oauth2 code authorization similar to bitly/oauth2_proxy
Configuration
OAuth2 Provider
configured by environment variables in .env
- update environment variables in .env
pre-defined providers
add other provider
- extend api/services/provider class in config/env/other.coffee
- customize the method validate, token, user, afterAuth
- define other.env with default environment variables
Default upstream sails_proxy confgiured in upstream.coffee
Start oauth2 proxy
run as node application
- create config files '.env'
- update environment variables defined in .env
npm install oauth2_code -g
set -a; . .env; set +a
env PORT=80 NODE_ENV=production oauth2_code
run docker image
- create config files '.env' if required
- update environment variables defined in .env
docker run --name oauth2_code -e "NODE_ENV=production" --env-file .env -p 1337:1337 -v /etc/ssl/certs:/etc/ssl/certs -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates -d twhtanghk/oauth2_code
run by docker compose (preferred way to start required services (mongo, echo, sails_proxy, oauth2_code)
- create config files '.env' if required
- update environment variables defined in .env
- update docker-compose.yml if required
docker-compose -f docker-compose.yml up