Reputation: 37
i have a web api that transfers files and checks user permissions.
Each user has read permission to the file.
eg.)
user 1 can read file1 and file2
user 2 can read file1 and file3
What's the best way to check user permissions on a file using Openid Connect in web API?
my idea :
Upvotes: 0
Views: 287
Reputation: 29301
When you want to authorize dynamically like this, the answer is usually to use a claim in the access token as you suggest. This might represent the owner of the file or some kind of group permission.
You may be dealing with domain specific claims here. This Claims Best Practices article discusses this type of claim and will maybe give you some ideas for your own solution.
Upvotes: 1