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

feat(auth): add content type and length to signature headers #804

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

njlie
Copy link
Contributor

@njlie njlie commented Nov 30, 2022

Changes proposed in this pull request

  • Adds Content-Type and Content-Length to the signature input & signature components of a generated httpsig signature.

Context

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Documentation added
  • Make sure that all checks pass

@github-actions github-actions bot added pkg: auth Changes in the GNAP auth package. type: source Changes business logic labels Nov 30, 2022
@njlie njlie force-pushed the nl-more-sig-inputs branch from 71698a7 to 77deea0 Compare November 30, 2022 19:57
@@ -69,18 +69,33 @@ export async function generateSigHeaders({
body?: unknown
authorization?: string
}
}): Promise<{ sigInput: string; signature: string; contentDigest?: string }> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to be able to just replace this with http-signature-utils' createSignatureHeaders?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, pretty easily I think.

@njlie njlie merged commit 55d11d1 into main Nov 30, 2022
@njlie njlie deleted the nl-more-sig-inputs branch November 30, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: auth Changes in the GNAP auth package. type: source Changes business logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include content type and length in signature input
2 participants