OAuth user authentication combined with server authentication and access layers

Question

I am working on one of my first OAuth solutions, using a pre-installed Visual Studio solution.

My authentication works fine, and when a client calls /token, they get a bearer token and all is fine. This token is a "user level" token, which you can see on every request to the server. This means I can add [Authorize] on those endpoints only the user should access.

However, at the same time, I also want my server applications to have "full access rights". They need to be able to get lists accross multiple users, delete things and so forth.

Here comes my questions, which I assume can be answered together very easily:

  1. How do you manage both short lived tokens (bearer tokens?) together with permanent tokens (API tokens?)
  2. How do I differ on access levels, so some methods require the permanent token?
  3. How do I differ on access levels in the same method (ie. typical GET methods, where a user only should get "his items" while an admin token can get "all")

Probably super simple - and most likely I just don't know what keywords to search on Google!


Show source
| asp.net   | asp.net-mvc   | asp.net-web-api   | authentication   | oauth   2017-09-05 21:09 0 Answers

Answers to OAuth user authentication combined with server authentication and access layers ( 0 )

Leave a reply to - OAuth user authentication combined with server authentication and access layers

◀ Go back