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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'auth/token.go')
-rw-r--r--auth/token.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/auth/token.go b/auth/token.go
index e1c196615..77127f351 100644
--- a/auth/token.go
+++ b/auth/token.go
@@ -76,6 +76,10 @@ func ExtractAuthInfo(ctx context.Context) (*AuthInfo, error) {
return nil, err
}
+ return parseToken(token)
+}
+
+func parseToken(token string) (*AuthInfo, error) {
split := strings.SplitN(string(token), ".", 3)
// v1 is base64-encoded using base64.StdEncoding, which cannot contain a ".".