-
Notifications
You must be signed in to change notification settings - Fork 28
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 custom headers #95
Comments
This would be nice indeed; currently looking into using this to get build status into Stride since Hipchat is on it's way out, but that needs the authorization header. |
Yeah. That's the exact same reason I was looking into it. :-) |
I was about to make the same request - also for Stride. I've created a new issue to request some Stride templates on top of this. Thanks for the hard work! |
Arrg. Atlassian! Why don't you send the |
BTW, I have a first version of "Bearer" running as an Custom Header support has no UI yet, but hacking the plugin-settings.xml file does work in the following way.
I'll tidy up the code, and make a test version available over the weekend, and you'll be able to test either method. The comment above was my frustration at implementing Bearer authentication the correct way with an The following from https://tools.ietf.org/html/rfc7235#section-4.1 states:
However, Atlassian choose not to do that with Stride. I now remember I had a similar problem with Jira a few years ago. |
Thanks for the work netwolf. I am also adding my +1 here as this will allow for Cisco Spark integration. |
Hi @dgilman Does Spark use bearer Auth or do you plan to use the headers in another way? |
Yes, it uses bearer auth like you have above, there's a bare bones example at the top of this documentation: https://developer.ciscospark.com/getting-started.html |
Ah. Cool. I did a quick Google on my phone and found lots about oauth2, so was just curious. I really should research oauth2 in case that would also be useful. |
As per issue #95. This commit adds preemptive and non-preemptive "Bearer token" authentication (configurable via the UI). It also has initial support for custom headers, although there is no UI to configure it yet. Adding custom headers can be done by adding a `<headers>` section to the `<webhook>` element in a project's `plugin-settings.xml` file. eg, ``` <headers> <header name="Authorization" value="Bearer blahblahblah" /> </headers> ```
Clean-up done. Release coming soon. |
New version for testing. |
For what it is worth, I'm now using this version with success! No issues noticed thus far. |
Great. Thanks for the feedback. It's now released |
eg:
curl -H 'Authorization: Bearer xxxxxxxxxxxxxxxx'
The text was updated successfully, but these errors were encountered: