Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CWT Claims & Type in Protected Headers #189

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

SteveLasker
Copy link
Contributor

@SteveLasker SteveLasker commented Jul 12, 2024

Due to DCO complications, this is a recreation of #183
Please see all comments in 183, including PR/LGTMs
fixes #173
fixes #184

Signed-off-by: steve lasker <stevenlasker@hotmail.com>
headers.go Outdated
@@ -471,6 +497,25 @@ func validateHeaderParameters(h map[any]any, protected bool) error {
if err := ensureCritical(value, h); err != nil {
return fmt.Errorf("header parameter: crit: %w", err)
}
case HeaderLabelType:
is_tstr := canTstr(value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_tstr => isTstr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed this and the isAlg for consistency

Signed-off-by: steve lasker <stevenlasker@hotmail.com>
@SteveLasker SteveLasker merged commit 8c458e2 into main Jul 15, 2024
5 checks passed
@SteveLasker SteveLasker deleted the feat/cwt-claims-in-headers branch July 19, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for typ in protected header Support for CWT Claims in Headers
3 participants