如何在Arure API管理服务中启用OAuth 2.0认证?

问题描述 投票:0回答:1

我想把一个有REST API的Web服务的数据路由。http:/demo.akeneo.comapirestv1categories。

我正在使用 Azure API 管理服务。我已经创建了一个Azure API管理服务和一个空白的API相同。我已经创建了一个GET方法。当测试这个API我有我面临着一个错误,如下。

HTTP/1.1 401 Unauthorized

cache-control: max-age=0, must-revalidate, no-store, private
content-security-policy: default-src 'self' *.akeneo.com 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'nonce-07f41c14e74157aff6fa6296dac0027c13e46705'; img-src 'self' data: ; frame-src * ; font-src 'self' data:
content-type: application/json
date: Tue, 12 May 2020 07:05:18 GMT
expires: Tue, 12 May 2020 07:05:18 GMT
ocp-apim-trace-location: https://apimst3v04xlapwxf3c99avt.blob.core.windows.net/apiinspectorcontainer/9kvUzyqpMfhQQii4nn7e49QLxiE1-16?sv=2018-03-28&sr=b&sig=e9ETEXuY0pbzxyM%2FLBsJiidcrVL%2BROf1FnZ9652IDfw%3D&se=2020-05-13T07%3A05%3A18Z&sp=r&traceId=ba521452333d475b95521351d7ac19f3
pragma: no-cache
transfer-encoding: chunked
vary: Origin
www-authenticate: Bearer realm="Service", error="access_denied", error_description="OAuth2 authentication required"
x-content-security-policy: default-src 'self' *.akeneo.com 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'nonce-07f41c14e74157aff6fa6296dac0027c13e46705'; img-src 'self' data: ; frame-src * ; font-src 'self' data:
x-frame-options: sameorigin
x-webkit-csp: default-src 'self' *.akeneo.com 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'nonce-07f41c14e74157aff6fa6296dac0027c13e46705'; img-src 'self' data: ; frame-src * ; font-src 'self' data:
{
    "error": "access_denied",
    "error_description": "OAuth2 authentication required"
}

当我改变我的安全OAuth 2.0,它给出了说没有OAuth 2.0服务器被配置。请谁能帮助我如何配置OAuth 2.0服务器。此外,是我使用的方法,在Azure API管理服务GET的REST API的数据是正确的。如果有其他工作方法,请说明。链接中的图片供参考

azure api azure-api-management
1个回答
0
投票

关于如何配置OAuth 2.0服务器,请参考本指南。

在API管理中配置OAuth 2.0授权服务器。.

© www.soinside.com 2019 - 2024. All rights reserved.