Skip to content

fix(api): return kind and observability grants from TokenVerifier.verify - #835

Closed
RaphaelFakhri wants to merge 1 commit into
livekit:mainfrom
RaphaelFakhri:fix/token-verifier-kind-observability
Closed

RaphaelFakhri wants to merge 1 commit into
livekit:mainfrom
RaphaelFakhri:fix/token-verifier-kind-observability

Conversation

@RaphaelFakhri

Copy link
Copy Markdown

Summary

TokenVerifier.verify() now returns the kind and observability claims. Both were written by AccessToken but dropped when the token was decoded, so claims.kind was always "" and claims.observability was always None.

Changes

  • Parse kind into Claims.kind.
  • Parse observability into Claims.observability, using the same approach as the sip and inference grants.
  • Add a round-trip test in tests/api/test_access_token.py.

Testing

pytest tests/api/test_access_token.py: the new test fails without the change (assert '' == 'agent') and passes with it. The existing tests in the file still pass.

@CLAassistant

CLAassistant commented Sep 29, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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