Skip to content

Make RegisteredClaims values constants #603

@an-kcu

Description

@an-kcu

Describe the problem you'd like to have solved

I would like to use the values defined in RegisteredClaims (and potentially HeaderParams) as annotation values, for example to model a JWT (full or just payload) using a custom class. Currently, the values defined in these classes are not marked final and therefore cannot be used in annotation values. As far as I can tell, there is no case where they need to be mutable, and it seems to me that these are intrinsically constant values.

Describe the ideal solution

Make all values defined in RegisteredClaims and HeaderParams final so that they can be used in annotation values. I'm happy to submit a PR, especially if this is the extent of the changes.

Alternatives and current work-arounds

Either finding an additional library that has these values, or redefining them as constants within my project.

Additional information, if any

java-jwt:4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature has been asked for or suggested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions