lvermeulen / Keycloak.Net

C# client for Keycloak 6.x
MIT License
206 stars 121 forks source link

add support for Protection API? #3

Closed timiil closed 5 years ago

timiil commented 5 years ago

as the title, do we have any plan to support Protection API ?

for example from Creating a Resource To create a resource you must send an HTTP POST request as follows:

curl -v -X POST \
  http://${host}:${port}/auth/realms/${realm_name}/authz/protection/resource_set \
  -H 'Authorization: Bearer '$pat \
  -H 'Content-Type: application/json' \
  -d '{
     "name":"Tweedl Social Service",
     "type":"http://www.example.com/rsrcs/socialstream/140-compatible",
     "icon_uri":"http://www.example.com/icons/sharesocial.png",
     "resource_scopes":[
         "read-public",
         "post-updates",
         "read-private",
         "http://www.example.com/scopes/all"
      ]
  }'
lvermeulen commented 5 years ago

Not at this moment, I'm afraid. Maybe I'll get to it some day, but I also accept PR's. :-)

lvermeulen commented 5 years ago

So I decided to implement this. You can find the project at Keycloak.Protection.Net. A pre-release version is available on NuGet.

timiil commented 5 years ago

very nice!