Skip to content

Do we need separate functions for JWT verification and ID extraction? #22

Description

@sreehari212000

Hey, I had a quick doubt, In https://github.com/amitshekhariitbhu/go-backend-clean-architecture/blob/main/internal/tokenutil/tokenutil.go both IsAuthorized and ExtractIDFromToken functions are doing almost the same token parsing and validation. Wouldn’t it be better to combine them into one function that verifies and returns claims or ID? Or is there a particular reason for keeping them separate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions