https://github.com/marwan-at-work/authproxy
A reverse proxy that appends Google ID Tokens
https://github.com/marwan-at-work/authproxy
auth go golang google proxy
Last synced: 11 months ago
JSON representation
A reverse proxy that appends Google ID Tokens
- Host: GitHub
- URL: https://github.com/marwan-at-work/authproxy
- Owner: marwan-at-work
- Created: 2019-03-26T03:04:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-09T23:16:53.000Z (about 7 years ago)
- Last Synced: 2025-04-07T03:35:33.682Z (about 1 year ago)
- Topics: auth, go, golang, google, proxy
- Language: Go
- Size: 2.93 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# authproxy
Package authproxy provides a reverse proxy that appends a Google ID Token to request headers. It also exposes a sub package that can be used as a server immediately.
## Usage
#### Docker
`docker run -p 9090:9090 -e REVERSE_PROXY_URL=mySecureServer.com -e SERVICE_ACCOUNT_KEY= marwan91/authproxy"`
#### Go
You can use the server directly as such
```bash
~ go install marwan.io/authproxy/cmd/authproxy
~ export REVERSE_PROXY_URL=mySecureServer.com
~ export SERVICE_ACCOUNT_KEY=
~ authproxy
# listening on port :9090
# you can set the PORT env if you want to user a port other than 9090
```
Or you can use it programtically:
```bash
~ go install marwan.io/authproxy
```
```golang
package main
import "marwan.io/authproxy"
func main() {
handler, err := authproxy.GetProxyHandler("mySecureProxy.com", "base64EncodedKey")
// handle err and use the proxy handler
// ...
}
```