Skip to content

feat: use new token claim fields#528

Merged
KevinJoiner merged 4 commits intomainfrom
update-token-claims
Oct 17, 2025
Merged

feat: use new token claim fields#528
KevinJoiner merged 4 commits intomainfrom
update-token-claims

Conversation

@KevinJoiner
Copy link
Contributor

Update jwt privilege handler to use new claim permissions and asset

@KevinJoiner KevinJoiner requested a review from Copilot October 17, 2025 12:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the JWT privilege handling system to use new token claim fields from the token-exchange-api. The changes replace the previous privilege token middleware with a new implementation from server-garage that uses updated permission constants.

Key changes:

  • Updated JWT middleware to use jwtmiddleware.OneOfPermissions from server-garage package
  • Replaced privilege constants with new permission constants from token-exchange-api (e.g., VehicleCommandsPermissionExecuteCommands)
  • Updated multiple dependencies including grpc-ecosystem, prometheus, and ethereum libraries to newer versions

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
go.mod Updates dependencies to support new JWT middleware and token claims packages, including server-garage v0.0.7 and token-exchange-api v0.3.7
cmd/devices-api/api.go Migrates from shared/pkg/middleware/privilegetoken to server-garage jwtmiddleware, updates all route handlers to use new permission constants

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KevinJoiner KevinJoiner merged commit 2192256 into main Oct 17, 2025
3 checks passed
elffjs added a commit that referenced this pull request Oct 27, 2025
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

Comments