mirror of
https://github.com/amitshekhariitbhu/go-backend-clean-architecture.git
synced 2026-04-27 05:25:51 +03:00
[PR #24] refactor: centralize JWT parsing and validation logic #24
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-backend-clean-architecture#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amitshekhariitbhu/go-backend-clean-architecture/pull/24
Author: @BalaadityaPatanjali
Created: 1/7/2026
Status: 🔄 Open
Base:
main← Head:refactor/jwt-token-parsing📝 Commits (1)
a58ba06refactor: centralize JWT parsing and validation logic📊 Changes
1 file changed (+24 additions, -16 deletions)
View changed files
📝
internal/tokenutil/tokenutil.go(+24 -16)📄 Description
Both
IsAuthorizedandExtractIDFromTokenwere independently parsing andvalidating JWT tokens, resulting in duplicated logic and increased maintenance
cost. So, created a function for it and not write the same logic again and again.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.