I\'m implementing a Web API 2 service architecture in my .NET web application. The client consuming the requests is pure javascript, no mvc/asp.net. I\'m using OWIN to try
You can configure it with your angular application module. So authorization token will be set as header for every http request.
var app = angular.module("app", ["ngRoute"]);
app.run(function ($http) {
$http.defaults.headers.common.Authorization = 'Bearer ' + token.accessToken;
});
Resolved by setting header 'Authorization' with Bearer + token like:
$http.defaults.headers.common["Authorization"] = 'Bearer ' + token.accessToken;