Skip to content

Commit 6577db8

Browse files
committed
chore: update documentation to include github teams
1 parent ec5f219 commit 6577db8

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

.traefik.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ testData:
1919
- 996
2020
logins:
2121
- luizfonseca
22+
teams:
23+
- 876255

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ providing a more secure way for users to access protected routes.
1313
## Quick Start (Docker)
1414

1515
1. Create a GitHub OAuth App
16-
16+
1717
- See: https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app
1818
- Set the Authorization callback URL to `http://<traefik-github-oauth-server-host>/oauth/redirect`
1919

2020
2. Run the Traefik GitHub OAuth server
21-
21+
2222
```sh
2323
docker run -d --name traefik-github-oauth-server \
2424
--network <traefik-proxy-network> \
@@ -31,9 +31,9 @@ providing a more secure way for users to access protected routes.
3131
```
3232

3333
3. Install the Traefik GitHub OAuth plugin
34-
34+
3535
Add this snippet in the Traefik Static configuration
36-
36+
3737
```yaml
3838
experimental:
3939
plugins:
@@ -43,12 +43,13 @@ providing a more secure way for users to access protected routes.
4343
```
4444
4545
4. Run your App
46-
46+
4747
```sh
4848
docker run -d --whoami test \
4949
--network <traefik-proxy-network> \
5050
--label 'traefik.http.middlewares.whoami-github-oauth.plugin.github-oauth.apiBaseUrl=http://traefik-github-oauth-server' \
5151
--label 'traefik.http.middlewares.whoami-github-oauth.plugin.github-oauth.whitelist.logins[0]=luizfonseca' \
52+
--label 'traefik.http.middlewares.whoami-github-oauth.plugin.github-oauth.whitelist.teams[0]=827726' \
5253
--label 'traefik.http.routers.whoami.rule=Host(`whoami.example.com`)' \
5354
--label 'traefik.http.routers.whoami.middlewares=whoami-github-oauth' \
5455
traefik/whoami
@@ -85,12 +86,16 @@ jwtSecretKey: optional_secret_key
8586
logLevel: info
8687
# whitelist
8788
whitelist:
88-
# The list of GitHub user ids that in the whitelist
89+
# The list of GitHub user ids that are whitelisted to access the resources
8990
ids:
9091
- 996
91-
# The list of GitHub user logins that in the whitelist
92+
# The list of GitHub user logins that are whitelisted to access the resources
9293
logins:
9394
- luizfonseca
95+
96+
# The list of Github Teams that are whitelisted to access the resources
97+
teams:
98+
- 988772
9499
```
95100
96101
## License

0 commit comments

Comments
 (0)