File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.DS_Store
2- .env
3- src
2+ 01-Authorization-RS256 / .env
3+ 01-Authorization-RS256 / vendor /
Original file line number Diff line number Diff line change 11README.md
22exec.sh
33exec.ps1
4- src /
Original file line number Diff line number Diff line change 1- FROM golang:1.8 -alpine3.6
1+ FROM golang:1.17 -alpine3.14
22
3- # install git
3+ # Install git
44RUN apk --update add \
55 git openssl \
66 && rm /var/cache/apk/*
77
8- WORKDIR /go/src
8+ # Define current working directory
9+ WORKDIR /01-Authorization-RS256
910
10- ADD . /go/src
11+ # Download modules to local cache so we can skip re-
12+ # downloading on consecutive docker build commands
13+ COPY go.mod .
14+ COPY go.sum .
15+ RUN go mod download
1116
12- RUN go-wrapper download
13-
14- CMD ["go" , "run" , "main.go" ]
17+ # Add sources
18+ COPY . .
1519
20+ # Expose port 3010 for our api binary
1621EXPOSE 3010
22+
23+ CMD ["go" , "run" , "main.go" ]
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ AUTH0_AUDIENCE={API_AUDIENCE}
2020### Install Dependencies and Start Server
2121
2222``` bash
23- # Install dependencies
24- go get -d
23+ # Download dependencies
24+ go mod vendor
2525
2626# Start the server
2727go run main.go
Original file line number Diff line number Diff line change 1+ module 01-Authorization-RS256
2+
3+ go 1.17
4+
5+ require (
6+ github.com/auth0/go-jwt-middleware v1.0.1
7+ github.com/codegangsta/negroni v1.0.0
8+ github.com/form3tech-oss/jwt-go v3.2.5+incompatible
9+ github.com/gorilla/mux v1.8.0
10+ github.com/joho/godotenv v1.3.0
11+ github.com/rs/cors v1.8.0
12+ )
Original file line number Diff line number Diff line change 1+ github.com/auth0/go-jwt-middleware v1.0.1 h1:/fsQ4vRr4zod1wKReUH+0A3ySRjGiT9G34kypO/EKwI =
2+ github.com/auth0/go-jwt-middleware v1.0.1 /go.mod h1:YSeUX3z6+TF2H+7padiEqNJ73Zy9vXW72U//IgN0BIM =
3+ github.com/codegangsta/negroni v1.0.0 h1:+aYywywx4bnKXWvoWtRfJ91vC59NbEhEY03sZjQhbVY =
4+ github.com/codegangsta/negroni v1.0.0 /go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0 =
5+ github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8 =
6+ github.com/form3tech-oss/jwt-go v3.2.5+incompatible /go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k =
7+ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI =
8+ github.com/gorilla/mux v1.8.0 /go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So =
9+ github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc =
10+ github.com/joho/godotenv v1.3.0 /go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg =
11+ github.com/rs/cors v1.8.0 h1:P2KMzcFwrPoSjkF1WLRPsp3UMLyql8L4v9hQpVeK5so =
12+ github.com/rs/cors v1.8.0 /go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM =
You can’t perform that action at this time.
0 commit comments