Reputation: 317
Hi I am new to Spring Security. I have a controller with a few endpoints. These endpoints are from the resource server.
POST /secured/user/create
POST /secured/user/update
GET /secured/user/{id}
Before accessing these APIs, client will have to get a token from my authorization server, then use it when calling the APIs above. However, I want to restrict the user to only access the GET api depending on his client ID. The client should not be able to call the create or update API.
Is there any way to do this? And how to do it in code? I am assuming the following
Any resources or links would be appreciated!
Upvotes: 1
Views: 2012
Reputation: 12322
can_read_user_data: true
.You can read a lot about claims, scopes, how they relate and what are some best practices around scopes and claims in articles found here: https://curity.io/resources/claims/
Upvotes: 1