You might want to take a look at this blog post.
It’s using Unity but it should end-up being the same.
Basically, use the WebAPI Dependency Resolver. Make sure that everything is mapped properly and it should be fine.
If after setting up your DI you still have problem with your OAuth token, let me know.
- How do the major C# DI/IoC frameworks compare? [closed]
- Questions about using Ninject
- Unauthorised webapi call returning login page rather than 401
- Simple Injector unable to inject dependencies in Web API controllers
- OWIN Security – How to Implement OAuth2 Refresh Tokens
- Get IPrincipal from OAuth Bearer Token in OWIN
- What is the overhead of creating a new HttpClient per call in a WebAPI client?
- Factory method with DI and IoC
- How to secure an ASP.NET Web API [closed]
- JWT authentication for ASP.NET Web API
- Resolving instances with ASP.NET Core DI from within ConfigureServices
- How to get HttpClient to pass credentials along with the request?
- Make Https call using HttpClient
- Multiple actions were found that match the request in Web Api
- Post parameter is always null
- Why should I use IHttpActionResult instead of HttpResponseMessage?
- Entity Framework Core: A second operation started on this context before a previous operation completed
- ASP.NET Core MVC : How to get raw JSON bound to a string without a type?
- How can I use a reserved keyword as an identifier in my JSON model class?
- Custom method names in ASP.NET Web API
- Web Api How to add a Header parameter for all API in Swagger
- Is there an alternative to bastard injection? (AKA poor man’s injection via default constructor)
- Enable CORS in Web API 2
- Set default global json serializer settings
- HttpClient not supporting PostAsJsonAsync method C#
- Get the IP address of the remote host
- Web API 2: how to return JSON with camelCased property names, on objects and their sub-objects
- Injecting dependencies into ASP.NET MVC 3 action filters. What’s wrong with this approach?
- HTTP 404 Page Not Found in Web Api hosted in IIS 7.5
- ASP.NET Core API only returning first result of list
- Web Api – Fire and Forget
- Do I need a Global.asax.cs file at all if I’m using an OWIN Startup.cs class and move all configuration there?
- Strings sent through Web API’s gets wrapped in quotes
- Async provider in .NET Core DI
- Use dependency injection in static class
- Selectively use default JSON converter
- Could not load file or assembly ‘System.Web.Http 4.0.0 after update from 2012 to 2013
- Webapi formdata upload (to DB) with extra parameters
- Use DbContext in ASP .Net Singleton Injected Class
- Suppress properties with null value on ASP.NET Web API
- Dependency Injection vs Service Location
- Hangfire – Multi tenant, ASP.NET Core – Resolving the correct tenant
- TempData null in asp.net core
- How to extend IdentityUser with custom property
- Dependency injection, inject with parameters
- How to to return an image with Web API Get method
- How do you login/authenticate a user with Asp.Net MVC5 RTM bits using AspNet.Identity?
- swagger-ui returns 500 after deployment
- Read HttpContent in WebApi controller
- Is it possible to get a good stack trace with .NET async methods?