This repository was archived by the owner on Apr 6, 2026. It is now read-only.
NOISSUE - Update jwt package to v5 and refactor claims usage#124
Merged
Conversation
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the JWT dependency to v5 and refactors all uses of StandardClaims to RegisteredClaims, adjusting expiration handling accordingly.
- Upgrade
github.com/golang-jwt/jwtto v5 - Replace
StandardClaimswithRegisteredClaimsand usejwt.NewNumericDate - Adjust imports and tests to match the v5 API
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| service.go | Switched import to /jwt/v5, updated parsing and creation to RegisteredClaims |
| go.mod | Bumped github.com/golang-jwt/jwt from v3.2.2 to v5.2.2 |
| certs_test.go | Updated import path and test token creation to use RegisteredClaims |
Comments suppressed due to low confidence (1)
certs_test.go:167
- There is no test covering
RetrieveCAToken. Adding a test for that function will ensure the newRegisteredClaimsbehavior inRetrieveCATokenis validated.
func TestGetCert(t *testing.T) {
dborovcanin
suggested changes
Jun 12, 2025
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
nyagamunene
approved these changes
Jun 12, 2025
dborovcanin
approved these changes
Jun 12, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What type of PR is this?
This is a security fix of https://github.com/absmach/certs/security/dependabot/7
What does this do?
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Did you document any new/modified features?
Notes