Laravel + JWT身份验证令牌_not_provided

时间:2015-10-19 18:44:09

标签: angularjs laravel jwt

我正在使用AngularJS开发app作为前端和laravel + JWTokens身份验证作为后端。我在真实主机上遇到了身份验证过程的问题。在本地主机上一切都很安静,但是当我尝试登录真实主机时,它总是返回错误400 token_not_provided。

我试图改变.htaccess

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

仍然得到同样的错误。然后我检查了标题。 Localhost get headers具有Authentication header + Bearer with token,但在真正的主机上没有这样的头。我已经花了三天时间,检查了很多主题,但没有找到解决方案。对不起我的英文

回复标题:

Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization
Cache-Control: no-cache
Connection: close
Content-Type: application/json
Server: Apache/2.4.12
Set-Cookie: laravel_session=eyJpdiI6Img1a1ZkWFwvbmdlMHR4M21cL2dGbnpCZz09IiwidmFsdWUiOiJSQkowODBNdXRQMHgxU0pOQURFbVNHR3FXXC9FWGhPSkttYmRkbVljaGJjTmV0bmdqTWZTM0F2aFZDdnlxY0hxekNLbmI2ZHlJYndMVWdwZTlmRjVcLzR3PT0iLCJtYWMiOiIwZjI3ODI4NTllOWFhMzJiYzc3MTY4MWRkOTA3NzgxODU5MTk2MmQ4YWIzZjYyNmUwMjg2Mjk0NDUzZmI4ZWRkIn0%3D; expires=Mon, 19-Oct-2015 20:12:23 GMT; Max-Age=7200; path=/; httponly
Transfer-encoding: chunked
x-powered-by: PHP/5.5.27

0 个答案:

没有答案