當我將此令牌發送到WebApi中的控制器時,我得到401(未授權)信息爲什麼?我把這個令牌形式登錄並且它是正確的。表單身份驗證 - 令牌發送到控制器
$scope.expiresCookie = $cookies.get('expires');
$scope.issuedCookie = $cookies.get('issued');
$scope.access_tokenCookie = $cookies.get('access_token');
$scope.expires_inCookie = $cookies.get('expires_in');
$scope.token_typeCookie = $cookies.get('token_type');
$scope.user_nameCookie = $cookies.get('user_name');
$scope.addLink = "http://localhost:56305/api/ProductInsuranceCar";
$http({
method: "GET",
url: $scope.addLink,
headers: { 'Authorization': '' + $scope.token_typeCookie + ' ' + $scope.access_tokenCookie + '' },
headers: { 'Content-Type': 'application/json; charset=utf-8' }
}).then(function mySucces(response) {
$scope.test = response;
}, function myError(response) {
});
圖片1
圖片2
實施例正確的請求
當我使用高級REST客戶端,我得到的信息,但在我的方法:/不工作...