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:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2020-02-27 15:32:03 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2020-02-27 15:32:03 +0300
commit2c658713c66b4460d7f6a3ab17baf173ddb0f8a4 (patch)
tree1a3a313a6533c8eed1e6f8a101c98da9e0de5cc8 /auth/rpccredentials.go
parent59dbd5b4a99d8b965c7c0228cbd0db0bb3ca41ba (diff)
Remove V1 authentication methods for clients
This change swaps V1 authentication with V2 without the caller knowing it did. This allows for a smooth transition toward V2. Idea taken from: https://gitlab.com/gitlab-org/gitaly/issues/2498#note_293995290
Diffstat (limited to 'auth/rpccredentials.go')
-rw-r--r--auth/rpccredentials.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/auth/rpccredentials.go b/auth/rpccredentials.go
index fc39a620b..4b7acc7b2 100644
--- a/auth/rpccredentials.go
+++ b/auth/rpccredentials.go
@@ -2,7 +2,6 @@ package gitalyauth
import (
"context"
- "encoding/base64"
"fmt"
"strconv"
"time"
@@ -15,7 +14,7 @@ import (
// with a Gitaly server. The shared secret must match the one used on the
// Gitaly server.
func RPCCredentials(sharedSecret string) credentials.PerRPCCredentials {
- return &rpcCredentials{sharedSecret: base64.StdEncoding.EncodeToString([]byte(sharedSecret))}
+ return &rpcCredentialsV2{sharedSecret: sharedSecret}
}
type rpcCredentials struct {