基于Cookie的会话angularjs

时间:2015-07-07 14:35:27

标签: angularjs cookies

在项目上我们使用基于令牌的会话,我们存储在localstorage中。 现在我们必须将其更改为cookie会话。后端已更改。 但是我在前端有一些问题 - 在请求登录响应标题后我看到:

Set-Cookie:PHPSESSID=4hdlnbi5tmkfrq95f072kf2lk0; path=/; HttpOnly

但我无法在浏览器中看到这些Cookie。

这是我的Authentification控制器的一部分。 也许我需要做一些改变。

authService.login = function (credentials) {
            return $http.post(CONFIG.baseUrl + "logins", credentials)
                .then(function (result) {
                    Session.create(result.data.token, result.data.level, result.data.accessTo, credentials.remember, result.data.user);
                    return result;
                });
        };

0 个答案:

没有答案