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

199 views Asked by At

w.r.t. Oracle REST Data Services (ORDS) : Authentication
And microservices-the-easy-way-with-ords-and-micronaut-part-1

Using PLSQL,
Through below code on SQL developer when tried, I received 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;

Using Curl,

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

I received html code, And in preview format I got enter image description here

Using Postman I get the same error in console. enter image description here

0

There are 0 answers