func (k KeychainSecretStore) RetrieveSecret(accountName NormalizedUsername) ([]byte, error) { encodedSecret, err := keychain.GetGenericPassword(k.serviceName(), string(accountName), "", "") if err != nil { return nil, err } if encodedSecret == nil { return nil, SecretStoreError{Msg: "No secret for " + string(accountName)} } secret, err := base64.StdEncoding.DecodeString(string(encodedSecret)) if err != nil { return nil, err } return secret, nil }
func (k KeychainSecretStore) RetrieveSecret() ([]byte, error) { return keychain.GetGenericPassword(G.Env.GetStoredSecretServiceName(), k.accountName, "", "") }