Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-06-03 15:30:23 +0300
committerceldem <celdem@gitlab.com>2019-06-27 18:34:36 +0300
commitf3e1a09309a222d2a0ea637705c860e7064f654b (patch)
tree6507b16a91efd78fb1a51395f3fb82232426647b
parentbd8aff8fd5cfe26ac576d351043239ffd309f8be (diff)
running license management with go modlm-configuration-go-mod
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--go.mod59
-rw-r--r--internal/admin/auth.go4
3 files changed, 64 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 43bbb93f..74584d39 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,7 @@
include:
template: License-Management.gitlab-ci.yml
+ variable:
+ - LICENSE_MANAGEMENT_SETUP_CMD: "go get"
.test: &test
script:
diff --git a/go.mod b/go.mod
new file mode 100644
index 00000000..c7eb3cbd
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,59 @@
+module gitlab.com/gitlab-org/gitlab-pages
+
+go 1.11
+
+require (
+ cloud.google.com/go v0.39.0 // indirect
+ github.com/OneOfOne/xxhash v1.2.5 // indirect
+ github.com/beorn7/perks v1.0.0
+ github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b // indirect
+ github.com/gogo/protobuf v1.2.1 // indirect
+ github.com/golang/mock v1.3.1 // indirect
+ github.com/golang/protobuf v1.3.1
+ github.com/google/btree v1.0.0 // indirect
+ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f // indirect
+ github.com/gorilla/context v1.1.2-0.20181012153548-51ce91d2eadd
+ github.com/gorilla/securecookie v1.1.2-0.20181010174647-e65cf8c5df81
+ github.com/gorilla/sessions v1.1.4-0.20181208214519-12bd4761fc66
+ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
+ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
+ github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
+ github.com/karrick/godirwalk v1.10.3
+ github.com/kisielk/errcheck v1.2.0 // indirect
+ github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
+ github.com/kr/pty v1.1.4 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.1
+ github.com/namsral/flag v0.0.0-20170814194028-67f268f20922
+ github.com/pkg/errors v0.8.1
+ github.com/prometheus/client_golang v0.9.3
+ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
+ github.com/prometheus/common v0.4.1
+ github.com/prometheus/procfs v0.0.1
+ github.com/prometheus/tsdb v0.8.0 // indirect
+ github.com/rs/cors v1.6.0
+ github.com/sirupsen/logrus v1.4.2
+ github.com/spaolacci/murmur3 v1.1.0 // indirect
+ github.com/stretchr/objx v0.2.0 // indirect
+ github.com/stretchr/testify v1.3.0
+ gitlab.com/gitlab-org/gitaly v1.43.0
+ gitlab.com/gitlab-org/gitlab-pages-proto v0.0.2
+ gitlab.com/lupine/go-mimedb v0.0.0-20180307000149-e8af1d659877
+ go.opencensus.io v0.22.0 // indirect
+ golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5
+ golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522 // indirect
+ golang.org/x/image v0.0.0-20190523035834-f03afa92d3ff // indirect
+ golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect
+ golang.org/x/mobile v0.0.0-20190509164839-32b2708ab171 // indirect
+ golang.org/x/mod v0.1.0 // indirect
+ golang.org/x/net v0.0.0-20190603091049-60506f45cf65
+ golang.org/x/oauth2 v0.0.0-20190523182746-aaccbc9213b0 // indirect
+ golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed
+ golang.org/x/text v0.3.2
+ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
+ golang.org/x/tools v0.0.0-20190602112858-2de7f9bf822c // indirect
+ google.golang.org/appengine v1.6.0 // indirect
+ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101
+ google.golang.org/grpc v1.21.0
+ gopkg.in/yaml.v2 v2.2.2 // indirect
+ honnef.co/go/tools v0.0.0-20190602125119-5a4a2f4a438d // indirect
+)
diff --git a/internal/admin/auth.go b/internal/admin/auth.go
index 944b0dcc..b8eeb618 100644
--- a/internal/admin/auth.go
+++ b/internal/admin/auth.go
@@ -1,12 +1,14 @@
package admin
import (
+ "time"
+
gitalyauth "gitlab.com/gitlab-org/gitaly/auth"
context "golang.org/x/net/context"
)
func authFunc(token string) func(context.Context) (context.Context, error) {
return func(ctx context.Context) (context.Context, error) {
- return ctx, gitalyauth.CheckToken(ctx, token)
+ return ctx, gitalyauth.CheckToken(ctx, token, time.Now())
}
}