casdoor icon indicating copy to clipboard operation
casdoor copied to clipboard

Is possible to support custom hooks \ plugins by programming

Open mojerro opened this issue 2 years ago • 2 comments

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.

mojerro avatar Apr 06 '22 09:04 mojerro

@Steve0x2a @seriouszyx @Abingcbc @ComradeProgrammer

casbin-bot avatar Apr 06 '22 09:04 casbin-bot

@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.

leo220yuyaodog avatar Aug 01 '22 08:08 leo220yuyaodog

@mojerro Hasura is already supported, see docs: https://casdoor.org/docs/integration/Haskell/Hasura

hsluoyz avatar May 10 '23 16:05 hsluoyz