Split up app URL with middleware. #312
-
|
there are two end user, merchant and public. Merhcant have different auth condition and user have diffrent auth condition with different route prefix. For merchant, there are many section, product, shop and so on. I want to split the merchant into different section. How to split the router with different condition. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @shahriar350 The feature is described here: https://www.neoteroi.dev/blacksheep/authorization/ In practice you could use the same way to authenticate users (e.g. using cookie or JWT Bearer authentication after sign-in) and then you would configure two authorization policies applying different kind of requirements. There is an example here https://www.neoteroi.dev/blacksheep/authorization/#defining-an-authorization-policy-that-checks-users-claims |
Beta Was this translation helpful? Give feedback.
Hi @shahriar350
Sorry for replying so late.
blacksheephas built-in support for the scenario you describe: I would define different authorization policie, one for regular users and one for merchants.The feature is described here: https://www.neoteroi.dev/blacksheep/authorization/
In practice you could use the same way to authenticate users (e.g. using cookie or JWT Bearer authentication after sign-in) and then you would configure two authorization policies applying different kind of requirements. There is an example here https://www.neoteroi.dev/blacksheep/authorization/#defining-an-authorization-policy-that-checks-users-claims