Skip to content

docs(examples): the impersonation example requires KEYCARD_RESOURCE (ECO-108) - #53

Merged
Larry-Osakwe merged 1 commit into
mainfrom
devin/1791482410-impersonation-resource-required
Oct 8, 2026
Merged

Larry-Osakwe merged 1 commit into
mainfrom
devin/1791482410-impersonation-resource-required

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

examples/impersonation/main.go documented KEYCARD_RESOURCE as optional and left it out of the fail-fast env check, but TokenExchangeClient.Impersonate returns oauth: ImpersonateRequest.Resource is required when Resource is 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.

  • Package comment: KEYCARD_RESOURCE Target resource URI (required).
  • Fail-fast check adds || resource == "" and the log.Fatal message lists KEYCARD_RESOURCE, matching examples/multi-zone/main.go.
  • The if resource != "" guard around the Access 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 -l flags this file for the numbered-list indentation in the package comment; that is preexisting on main and outside the three edits here, so left alone.

No version or CHANGELOG edits; docs type 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

…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>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@Larry-Osakwe Larry-Osakwe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches impersonation.md (resource required) and the multi-zone example's check.

@Larry-Osakwe
Larry-Osakwe merged commit 06f7389 into main Oct 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants