I'm trying to use Satellizer 0.15.5 to manage my user authentication.
I configure my satellizer as follows:
$authProvider.loginUrl = "http://localhost:8080/login/";
$authProvider.tokenName = "Authorization";
$authProvider.tokenPrefix = "myApp",
And in my controller I have:
$auth.login({
userName: $scope.user,
userPassword: $scope.password
})
.then(function(){
$location.path("/");
ngDialog.close();
})
.catch(function(response){
// Something went wrong
});
It meakes the request correctly, in fact, I'm getting my headers as I expect, and I get my Authorization token, however, it's not being sending in the following requests.
Theese are the only headers I retrieve in my server:
Header: Origin
Header: Cache-Control
Header: Accept
Header: Connection
Header: User-Agent
Header: Referer
Header: Host
Header: Pragma
Header: Accept-Encoding
Header: Accept-Language
And I'm not setting any header in any other point of the code... Am I missing some configuration or what's wrong?
EDIT: I'm using angular 1.6.4, so it's not an incompatibility versions problem.
This is what I have in my project:
Hope it will help you.
Because of cross domain problem I send request to
api.php- located in my client project and looks like: