There was an error while loading. Please reload this page.
2 parents b0820e3 + 869b277 commit 4f6bc8aCopy full SHA for 4f6bc8a
1 file changed
wincred/wincred.go
@@ -16,12 +16,14 @@ type Wincred struct{}
16
17
// Add adds new credentials to the windows credentials manager.
18
func (h Wincred) Add(creds *credentials.Credentials) error {
19
- credsLabels := []byte(credentials.CredsLabel)
20
g := winc.NewGenericCredential(creds.ServerURL)
21
g.UserName = creds.Username
22
g.CredentialBlob = []byte(creds.Secret)
23
g.Persist = winc.PersistLocalMachine
24
- g.Attributes = []winc.CredentialAttribute{{Keyword: "label", Value: credsLabels}}
+ g.Attributes = append(g.Attributes, winc.CredentialAttribute{
+ Keyword: "label",
25
+ Value: []byte(credentials.CredsLabel),
26
+ })
27
28
return g.Write()
29
}
0 commit comments