Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Drupal 8:REST导出视图不能使用简单的oauth模块_Rest_Drupal_Drupal Views_Drupal 8 - Fatal编程技术网

Drupal 8:REST导出视图不能使用简单的oauth模块

Drupal 8:REST导出视图不能使用简单的oauth模块,rest,drupal,drupal-views,drupal-8,Rest,Drupal,Drupal Views,Drupal 8,我正在使用with模块进行REST授权和身份验证 我创建了一个简单的REST导出视图,并将“Authentication”设置为“basic_auth,simple_oauth” 但当我尝试URL时,它会显示错误 { "message": "The used authentication method is not allowed on this route." } 查看详细信息: 更新: 标题详细信息: "url": "http://localhost/d8/api/stories?_

我正在使用with模块进行REST授权和身份验证

我创建了一个简单的REST导出视图,并将“Authentication”设置为“basic_auth,simple_oauth”

但当我尝试URL时,它会显示错误

{
  "message": "The used authentication method is not allowed on this route."
}
查看详细信息:

更新: 标题详细信息:

"url": "http://localhost/d8/api/stories?_format=hal_json",
"method": "GET",
"headers": {
    "authorization": "Bearer <oauth token>"
}
“url”:http://localhost/d8/api/stories?_format=hal_json",
“方法”:“获取”,
“标题”:{
“授权”:“持票人”
}

我通过删除“身份验证”并按角色类型添加“访问”来解决问题