I am developing single page application with angularJs, the application uses JWT Authorization headers to authenticate with my MVC web API. I recently integrated Kendo into the application but i noticed that my AngularJs request interceptor is not able to intercept calls generated from kendo grid .
Is there a common place where i can intercept http requests initiated from Kendo grid and other kendo components . so that i can add Authorization Header ?
here is my inerceptor
['$httpProvider', function ($httpProvider) { $httpProvider.interceptors.push('authInterceptorService'); }]
function addToken(config) {
var token = tokenStoreFactory.getToken();
if (token) {
config.headers = config.headers || {};
config.headers['Authorization'] = 'Bearer ' + token;
}
return config;
}
Is there a common place where i can intercept http requests initiated from Kendo grid and other kendo components . so that i can add Authorization Header ?
here is my inerceptor
['$httpProvider', function ($httpProvider) { $httpProvider.interceptors.push('authInterceptorService'); }]
function addToken(config) {
var token = tokenStoreFactory.getToken();
if (token) {
config.headers = config.headers || {};
config.headers['Authorization'] = 'Bearer ' + token;
}
return config;
}