When using Keycloak for authorization it allows creating protected resources. But it only allows defining the URI. How can I also add the HTTP method for the resource?
Although it seems the policy enforcers allows us to define such details, how is Keycloak able to map the HTTP method with the resource?
Thanks in Advance.
If you want scopes to be mapped to HTTP methods then you need to set http-method-as-scope
to true.
You can check policy enforcer documentation here
With spring-boot adapter you can set keycloak.policy-enforcer-config.http-method-as-scope=true
and your resources would be associated with scopes such as GET, PUT, POST, DELETE, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With