casdoor
casdoor copied to clipboard
Is possible to support custom hooks \ plugins by programming
refer to #387
I'm using Hasura too, and I also have some other apps using cookie\jwt to auth user. Now Webhooks section can add custom headers but it's hardcoded, some information in the header is also unsafe, I need to put it in JWT or cookies.
This scenario is a bit complex and a hook may be the easiest way to support most of these custom requirements.
I'm now trying to modify GetTokenByUser
function to support my custom requirements.
By using a hook, I just need to code in hooks instead of change the origin code.
@Steve0x2a @seriouszyx @Abingcbc @ComradeProgrammer
@mojerro Hi, I'm doing this issue. I have doubts about the way how Hasura integrate with casdoor. Could you provide a simple example? I'm not familiar with hook. Now the body is hard code, do you mean that you want to modify the content directly in the webhook page, rather than in the origin code.
@mojerro Hasura is already supported, see docs: https://casdoor.org/docs/integration/Haskell/Hasura