When using JSONP on a request with basic auth, it is necessary to include the Authorization header in the request to retrieve the token.
Upon testing this:
$scope.doRequest = function() {
$http({method: 'JSONP', url: 'http://apilder-apiscory.fr/token?callback=JSON_CALLBACK',headers: {'Authorization': 'Basic basic'}})
.success(function(data){
console.log(data.token);
});
However, I always receive an HTTP status code 401.
Could you please advise on how to resolve this issue?
Your assistance is greatly appreciated.