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 Signature header support. #83

Merged
merged 5 commits into from
Oct 30, 2019
Merged

Add Signature header support. #83

merged 5 commits into from
Oct 30, 2019

Conversation

lizheming
Copy link
Contributor

@lizheming lizheming commented Feb 15, 2019

As specification said, It also support header named Signature and there has no scheme in field value.

The sender is expected to transmit a header (as defined in RFC 7230, Section 3.2) where the "field-name" is "Signature", and the "field-value" contains one or more "auth-param"s (as defined in RFC 7235, Section 4.1) where the "auth-param" parameters meet the requirements listed in Section 2: The Components of a Signature.
via: https://tools.ietf.org/id/draft-cavage-http-signatures-10.html#sig-header

Both parser and signer should be update to support signature header. I have different logic in parser.js and signer.js.

About sign generator part, we only need to add support for Signature header if developer set in options, because the format is different with Authorization header (just omit scheme part).

While we'll use this module to parser http request from different service, we should have max compatibility in parser part. So I will try to get authorizationHeaderName which developer set, then try to get authorization header, at last I'll try to get signature header.

close #77 when pr merged.

@lizheming lizheming mentioned this pull request Feb 15, 2019
@aldex32
Copy link

aldex32 commented Jun 27, 2019

Hello,

any plan to merge this PR?

Thanks,
Aldo

@aldex32
Copy link

aldex32 commented Jun 28, 2019

@jclulow any idea? ☝️

@mattzuba
Copy link

mattzuba commented Jul 7, 2019

I'm currently building a drone.io plugin where the drone server sends the signature header over, so support for this would be desirable. Would love to see feedback on this and potential merging.

@lizheming
Copy link
Contributor Author

lizheming commented Jul 7, 2019

@mattzuba I have met this problem in the same scene, so I created the pr. Right now we can overwrite authorization header to fit it, just like https://github.com/lizheming/drone-js-config/blob/a43c559662ab7f46299849eff5660205bcf059f2/src/logic/index.js#L4-L12.

@arekinath can you have a look this pull request and merge it? thx~

@fmartinou
Copy link

fmartinou commented Oct 29, 2019

Hello,
Any news?

Do we have a chance to see this PR merged in the near future?
All french Banks rely on this specification for their new APIs (https://www.stet.eu/en/psd2/) so this support would be really appreciated.

@kusor kusor merged commit 276bd13 into TritonDataCenter:master Oct 30, 2019
@kusor
Copy link
Contributor

kusor commented Oct 30, 2019

Hello,
Any news?

Do we have a chance to see this PR merged in the near future?
All french Banks rely on this specification for their new APIs (https://www.stet.eu/en/psd2/) so this support would be really appreciated.

Done. Hope this help addressing PSD2 issues.

kusor added a commit that referenced this pull request Nov 5, 2019
@kusor kusor mentioned this pull request Nov 5, 2019
bahamas10 added a commit that referenced this pull request Nov 5, 2019
- fixes node 0.10 usage which was broken by PR #83 and released in v1.3.0
- updates jsstyle and javascriptlint to latest versions on the joyent github org
- various style nits
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 Signature header
5 participants