ORDS:错误 401 - 未经授权来自 RFC 2068 超文本传输协议 -- HTTP/1.1:10.4.2 401 未经授权

ORDS: Error 401--Unauthorized From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.4.2 401 Unauthorized

提问人:Anand Jagtap 提问时间:11/17/2023 最后编辑:Anand Jagtap 更新时间:11/17/2023 访问量:23

问:

w.r.t. Oracle REST Data Services (ORDS):身份验证
微服务-the-easy-way-with-ords-and-micronaut-part-1

使用PLSQL,通过以下代码在SQL开发人员上尝试时,
我收到了.
ORA-20001: Authentication failed

BEGIN
    APEX_WEB_SERVICE.OAUTH_AUTHENTICATE(
        P_TOKEN_URL     => 'http://<host:ip>/ords/<schema>/oauth/token',
        P_CLIENT_ID     => 'xxxxxxxxxxBaDNGqSq1atg..',
        P_CLIENT_SECRET => 'xxxxxxxxxx5NlSRSoeJrUw..');
    DBMS_OUTPUT.PUT_LINE(APEX_WEB_SERVICE.OAUTH_GET_LAST_TOKEN);
END;

使用 Curl,

curl -i -k --user xxxxxxxxxxBaDNGqSq1atg..:xxxxxxxxxx5NlSRSoeJrUw.. --data "grant_type=client_credentials" http://<host ip:port>/ords/<schema>/oauth/token

我收到了html代码,并以预览格式得到了enter image description here

使用 Postman我在控制台中遇到同样的错误。enter image description here

curl plsql oauth-2.0 oracle-apex-19.1 oracle-rest-data-services

评论


答: 暂无答案