Repository navigation
docs(examples): the impersonation example requires KEYCARD_RESOURCE (ECO-108) - #53
Merged
Larry-Osakwe merged 1 commit intoOct 8, 2026
Conversation
…ECO-108) TokenExchangeClient.Impersonate rejects an empty Resource, so the example now says so up front instead of failing at the client. Co-Authored-By: Larry Osakwe <larry@keycard.ai>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Larry-Osakwe
approved these changes
Oct 8, 2026
Larry-Osakwe
left a comment
Collaborator
There was a problem hiding this comment.
Matches impersonation.md (resource required) and the multi-zone example's check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/impersonation/main.godocumentedKEYCARD_RESOURCEas optional and left it out of the fail-fast env check, butTokenExchangeClient.Impersonatereturnsoauth: ImpersonateRequest.Resource is requiredwhenResourceis empty (oauth/impersonate.go:49), per impersonation.md unit row 4 (ECO-92). Run without it, the example failed at the client instead of saying so up front.KEYCARD_RESOURCE Target resource URI (required).|| resource == ""and thelog.Fatalmessage listsKEYCARD_RESOURCE, matchingexamples/multi-zone/main.go.if resource != ""guard around theAccess resource:banner line is dropped; it always prints.Closes ECO-108.
Verification
go vet ./...: clean.go build ./examples/...: clean.git diff --check: clean. Em dashes in added lines: 0.gofmt -lflags this file for the numbered-list indentation in the package comment; that is preexisting onmainand outside the three edits here, so left alone.No version or CHANGELOG edits;
docstype so no release fires.Link to Devin session: https://app.devin.ai/sessions/bbc062cf32b548ef9c4b8b444d2ec67f
Open in Devin Desktop: https://app.devin.ai/desktop/session/bbc062cf32b548ef9c4b8b444d2ec67f?variant=devin
Requested by: @Larry-Osakwe