-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path95.txt
More file actions
11 lines (11 loc) · 684 Bytes
/
Copy path95.txt
File metadata and controls
11 lines (11 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
Authorization
Task:
Whitelist email addresses that have access to GetAddresses() endpoint in AddressController.cs
Solution:
Create a variable whitelist to put addresses that have access to this endpoint and then we read the email address
from our HTTP context, it has a reference to the user and from there we can get our email address when our user
has already authenticated the whitelist, for example store in your db.
1) Put everyone in who has a subscription
- If you have a subscription based model for your API or
- If it's an internal API for a company, write everyone in there
in the configuration who has access to this API, to this endpoint