c# - Best practices for passing Access Token to Web API to perform calls on behalf of user -


disclaimer: first time dealing oauth.

i'm setting web api middleman between user (using mobile application), , xero public application.

for user access xero data, must first authenticate xero public application. user supplied access token , access token secret @ end of authentication process. done via oauth 1.1.

at point, mobile application has access token , access token secret - supplied xero public application. point user never talk xero public application again.

what need have user send post web api contains xero username , xero access token (and possibly xero access token secret). web api controller receive request, , send request xero public application ensure works.

when ok response has been received xero public application, web api register user storing user (with xero username), , organisation (with access token + secret) in database.

at point, necessary credentials stored in web api database, , web api controllers can perform requests on behalf of user. entire reasoning behind web job can set pull xero data web api once or twice day, , user ever accesses data.

my questions are:

  • are there red flags here?
  • do need provide access token between user/mobile application , web api? given device, or user?
  • owin can provide access tokens, i'm unsure how should using them between mobile application <-> web api.

thanks in advance.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -