Skip to content

refactor: Enhance token exchange logic for RFC8693 compliance - #3227

Open
yuito-it wants to merge 1 commit into
vmware:mainfrom
yuito-it:fix/is-need-token-exchange
Open

refactor: Enhance token exchange logic for RFC8693 compliance#3227
yuito-it wants to merge 1 commit into
vmware:mainfrom
yuito-it:fix/is-need-token-exchange

Conversation

@yuito-it

@yuito-it yuito-it commented Aug 7, 2026

Copy link
Copy Markdown

Summary

This PR improves the needRFC8693TokenExchange function in the Pinniped CLI to handle both string and slice types ([]string / []interface{}) for the aud claim in ID tokens when checking against requestedAudience.

Background / Details

  • Previously, when an IdP returned the aud claim as an array/slice (e.g., ["client-id"]), comparing it directly against a string requestedAudience caused type mismatches or unexpected condition evaluations.
  • This change ensures that the CLI safely checks whether requestedAudience is present in the aud claim regardless of whether aud is formatted as a single string or a slice of strings/interfaces.

Fixes

none

Release note

Fixed an issue in Pinniped CLI where RFC8693 Token Exchange determination logic failed to properly evaluate ID token `aud` claims when formatted as an array/list.

Signed-off-by: Yuito Akatsuki (Tani Yutaka) <yuito@yuito-it.jp>
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for pinniped-dev canceled.

Name Link
🔨 Latest commit de8543f
🔍 Latest deploy log https://app.netlify.com/projects/pinniped-dev/deploys/6a75afe6f5ef4c0008b46ae4

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.

1 participant