Reputation: 11164
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.
Upvotes: 4
Views: 3446
Reputation: 9633
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.
Upvotes: 3