Skip to content

Add helpers for setting typ and cty header parameters #497

@Arabasta

Description

@Arabasta

Currently applications must mutate the Token.Header map directly to set header parameters typ RFC7519 Section 5.1 and cty RFC7519 Section 5.2.

Example:

    token.Header["typ"] = "JWT"

This issue proposes adding small helper methods:

    token.SetType("at+jwt")
    token.SetContentType("JWT")

These would simply modify Token.Header internally and would not change signing or validation behaviour.

This may improve discoverability for these registered header parameters.

Related discussion: #238

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions