diff options
author | Michael Muré <batolettre@gmail.com> | 2020-07-28 12:56:46 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-09-29 20:42:21 +0200 |
commit | 3ecbf8db28105d147340b80d65a5a6d537233135 (patch) | |
tree | 9bda351f7d1d520fa0ae51b155792ffca3517a9d /bridge/core/auth/token.go | |
parent | b127481364176ac7ecb56c1604e1460251574859 (diff) | |
download | git-bug-3ecbf8db28105d147340b80d65a5a6d537233135.tar.gz |
bridge: store credentials in the Keyring instead of the git config
Diffstat (limited to 'bridge/core/auth/token.go')
-rw-r--r-- | bridge/core/auth/token.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/core/auth/token.go b/bridge/core/auth/token.go index 1f019f44..84d6ac13 100644 --- a/bridge/core/auth/token.go +++ b/bridge/core/auth/token.go @@ -8,7 +8,7 @@ import ( ) const ( - configKeyTokenValue = "value" + keyringKeyTokenValue = "value" ) var _ Credential = &Token{} @@ -28,14 +28,14 @@ func NewToken(target, value string) *Token { } func NewTokenFromConfig(conf map[string]string) (*Token, error) { - base, err := newCredentialBaseFromConfig(conf) + base, err := newCredentialBaseFromData(conf) if err != nil { return nil, err } return &Token{ credentialBase: base, - Value: conf[configKeyTokenValue], + Value: conf[keyringKeyTokenValue], }, nil } @@ -65,6 +65,6 @@ func (t *Token) Validate() error { func (t *Token) toConfig() map[string]string { return map[string]string{ - configKeyTokenValue: t.Value, + keyringKeyTokenValue: t.Value, } } |