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: allow multiple webhook body sources #1606

Merged
merged 7 commits into from
Jul 30, 2021
Merged

Conversation

zepatrik
Copy link
Member

Related issue(s)

Currently the webhook body can only be loaded from a local file. This allows to use any source enabled in the JSONSchema loaders (file, base64, https, ...)

Checklist

Further Comments

selfservice/hook/web_hook_test.go Show resolved Hide resolved
"file:///path/to/body.jsonnet",
"/path/to/body.jsonnet",
"./body.jsonnet",
"base64://ZnVuY3Rpb24oY3R4KSB7CiAgaWRlbnRpdHlfaWQ6IGlmIGN0eFsiaWRlbnRpdHkiXSAhPSBudWxsIHRoZW4gY3R4LmlkZW50aXR5LmlkLAp9="
Copy link
Member

Choose a reason for hiding this comment

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

Do we allow loading from http too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, if the loader is registered.

@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #1606 (b879d01) into master (60d848d) will increase coverage by 0.00%.
The diff coverage is 81.81%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1606   +/-   ##
=======================================
  Coverage   74.17%   74.18%           
=======================================
  Files         257      258    +1     
  Lines       12557    12568   +11     
=======================================
+ Hits         9314     9323    +9     
- Misses       2624     2626    +2     
  Partials      619      619           
Impacted Files Coverage Δ
x/provider.go 50.00% <50.00%> (ø)
selfservice/hook/web_hook.go 89.69% <88.23%> (+0.45%) ⬆️
x/nosurf.go 92.59% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64c90bf...b879d01. Read the comment docs.

@aeneasr aeneasr merged commit 51b1311 into master Jul 30, 2021
@aeneasr aeneasr deleted the feat/webhook-body-base64 branch July 30, 2021 08:47
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.

2 participants