ferrerojosh / nest-keycloak-connect

keycloak-nodejs-connect module for Nest
MIT License
312 stars 124 forks source link

Dynamic Resource Decorator in Nest Js application #131

Open hamzasaiff195 opened 2 years ago

hamzasaiff195 commented 2 years ago

We are using keycloak for user authentication and authorization in Nest Js application. We want to implement resource-based-authorization and user-managed-access and for this purpose we need to customize or dynamic @Resource() Decorator. For example if a person bob has resource named 'Alpha' then we have to pass that resources name in Decorator ==> @Resource('Alpha') then it'll allow request to move forward if this condition satisfied. We don't want to hard code any value in @Resource Decorator we want it to be dynamic.

Any suggestions or solution will be appreciated.

bonnzer commented 2 years ago

Agree. Resource should accept dynamic data to allow pass resource names (or resource URIs #123, but names are preferred)

Any suggestions or solution will be appreciated

There's no solution yet I guess

ferrerojosh commented 1 year ago

There is no solution for now, this needs to be a feature along with #123