【发布时间】:2017-04-05 04:52:42
【问题描述】:
寻找 Auth0 的便利性来整理我的 Angular 2 客户端和 Laravel 5.3 API 之间的 JWT。我已遵循(并仔细检查了我已遵循)Auth0 的入门指南:
https://auth0.com/docs/quickstart/backend/php-laravel
但似乎无法让它对我进行身份验证。当我卷曲如下:
curl --request GET --url http://localhost/api/test --header 'authorization: auth0_id_token'
我明白了:
Unauthorized user curl: (6) Could not resolve host: auth0_id_token
在我的\routes\api 中,我有:
Route::get('/test', array('middleware' => 'auth0.jwt', function() {
return "Hello " . Auth0::jwtuser()->name;
}));
我正在使用这个生成id_token:
https://auth0.com/docs/api/authentication#!#post--oauth-ro
当我转到 (https://manage.auth0.com/#/users) 时,可以看到 Auth0 认为用户已登录。
任何关于我应该在哪里尝试和调试的指针?
【问题讨论】: