Skip to content

Commit dddefbd

Browse files
committed
Remove secret reference validation
1 parent 8ff073f commit dddefbd

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

example/main.go

-11
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ func main() {
3131
item := createAndGetItem(client)
3232
getAndUpdateItem(client, item.VaultID, item.ID)
3333
listVaultsAndItems(client, item.VaultID)
34-
validateSecretReference(item.VaultID, item.ID, "username")
3534
resolveSecretReference(client, item.VaultID, item.ID, "username")
3635
resolveTOTPSecretReference(client, item.VaultID, item.ID, "TOTP_onetimepassword")
3736
deleteItem(client, item.VaultID, item.ID)
@@ -124,16 +123,6 @@ func resolveTOTPSecretReference(client *onepassword.Client, vaultID, itemID, fie
124123
// [developer-docs.sdk.go.resolve-totp-code]-end
125124
}
126125

127-
func validateSecretReference(vaultID, itemID, fieldID string) {
128-
// [developer-docs.sdk.go.validate-secret-reference]-start
129-
// Validate your secret reference
130-
err := onepassword.ValidateSecretReference(context.Background(), fmt.Sprintf("op://%s/%s/%s", vaultID, itemID, fieldID))
131-
if err != nil {
132-
panic(err)
133-
}
134-
// [developer-docs.sdk.go.validate-secret-reference]-end
135-
}
136-
137126
func createAndGetItem(client *onepassword.Client) onepassword.Item {
138127
// [developer-docs.sdk.go.create-item]-start
139128
sectionID := "extraDetails"

internal/release/RELEASE-NOTES

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
The v0.1.2 release of the Go SDK brings:
22
* Support for item tags. You can now create, get, and edit tags within your 1Password items using item CRUD functions.
33
* Support for fetching one-time password codes using secret references. You can now fetch your TOTP code with the `Secrets.Resolve` function, using a secret reference for the TOTP field in your item. For example: "op://vault/item/field?=attribute=totp"
4-
* Support for validating secret references. You can now check that a secret reference is formatted correctly without having to resolve it or even authenticate, using the 'ValidateSecretReference' function.

secrets.go

-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)