Commit 8e2a26c 1 parent f4c4073 commit 8e2a26c Copy full SHA for 8e2a26c
File tree 4 files changed +74
-1
lines changed
4 files changed +74
-1
lines changed Original file line number Diff line number Diff line change 6
6
matrix :
7
7
go :
8
8
- 1.14
9
+ - 1.15
9
10
name : Build
10
11
runs-on : ubuntu-latest
11
12
Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " !**/*"
7
+ tags :
8
+ - " v*"
9
+
10
+ jobs :
11
+ goreleaser :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v2
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v1
18
+ with :
19
+ go-version : 1.15
20
+ - name : Run GoReleaser
21
+ uses : goreleaser/goreleaser-action@v1
22
+ with :
23
+ version : latest
24
+ args : release
25
+ env :
26
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ before :
2
+ hooks :
3
+ - go mod download
4
+ builds :
5
+ - env :
6
+ - CGO_ENABLED=0
7
+ main : ./cmd/amzn-oidc-validate-server/main.go
8
+ goarch :
9
+ - darwin
10
+ - amd64
11
+ archives :
12
+ checksum :
13
+ name_template : " checksums.txt"
14
+ snapshot :
15
+ name_template : " {{ .Tag }}-next"
16
+ changelog :
17
+ sort : asc
18
+ filters :
19
+ exclude :
20
+ - " ^docs:"
21
+ - " ^test:"
Original file line number Diff line number Diff line change 6
6
7
7
go-amzn-oidc is a validator for x-amzn-oidc-data as JWT.
8
8
9
- ## Usage
9
+ ## Usage as a library
10
10
11
11
``` go
12
12
package main
@@ -36,6 +36,31 @@ func main() {
36
36
}
37
37
```
38
38
39
+ ## With nginx auth_request
40
+
41
+ ``` console
42
+ $ amzn-oidc-validate-server
43
+ 2020/10/24 01:50:06 [info] Listening 127.0.0.1:8080
44
+ ```
45
+
46
+ nginx.conf
47
+ ``` conf
48
+ location = /oidc_validate {
49
+ proxy_pass http://127.0.0.1:8080;
50
+ proxy_set_header X-Amzn-OIDC-Data $http_x_amzn_oidc_data;
51
+ proxy_set_header Content-Length "";
52
+ proxy_pass_request_body off;
53
+ internal;
54
+ }
55
+
56
+ location / {
57
+ auth_request /oidc_validate;
58
+ auth_request_set $email $upstream_http_x_auth_request_email;
59
+ proxy_set_header X-Email $email;
60
+ # ...
61
+ }
62
+ ```
63
+
39
64
## LISENSE
40
65
41
66
MIT
You can’t perform that action at this time.
0 commit comments