mule4-mcd-level2
mule4-mcd-level2 copied to clipboard
Hands ON 2.4 - Oauth Issues
Hi Siddharth! First of all thank you for taking the time to teach, your course is very well designed and all the steps are very clear.
I would like to report you that the authentication for reservations API is not working.
From Studio I'm getting 404 Error
Global.xml config
<os:object-store name="oauthTokenObjectStore" doc:name="Object store" doc:id="73b7eefd-95c8-4308-9ee4-45fa7c32c15e" entryTtl="60" entryTtlUnit="MINUTES" expirationInterval="60" />
<http:request-config name="bookingDataByBID" doc:name="HTTP Request configuration" doc:id="72e7570b-e2d6-47d2-bae2-4f31e6de555a" basePath="/booking" >
<http:request-connection protocol="HTTPS" host="onlineman477-eval-prod.apigee.net" port="443" >
<http:authentication >
<oauth:client-credentials-grant-type clientId="KZ25TpHNeppVOmwtKpD6jQAjnq4vrLG1" clientSecret="CYBpVYhSeqSy4GSR" tokenUrl="https://onlineman477-eval-prod.apigee.net/owasp-oauth/token" >
<oauth:token-manager objectStore="oauthTokenObjectStore" />
</oauth:client-credentials-grant-type>
</http:authentication>
</http:request-connection>
</http:request-config>
Received Error
"Error response when calling token URL 'https://onlineman477-eval-prod.apigee.net/owasp-oauth/token'. Response was:
DefaultHttpResponse {
responseStatus: 404 (Not Found),
headers: MultiMap{[date=[Thu, 09 May 2024 12:56:39 GMT], content-type=[text/html], content-length=[344], connection=[keep-alive], etag=["60adabf8-158"], x-frame-options=[DENY], x-xss-protection=[1], x-content-type-options=[nosniff], strict-transport-security=[max-age=86400], content-security-policy=[frame-ancestors 'none']]}
}
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
</body>
</html>
"
From POSTMAN I'm getting 502 Bad Gateway
From CURL I'm getting 502 Bad Gateway
I'm using curl command placed into hands-on-solutions/Section2/2.4/OAuth_Details.txt
➜ --request POST 'https://onlineman477-eval-prod.apigee.net/owasp-oauth/token' \
--header 'Authorization: Basic S1oyNVRwSE5lcHBWT213dEtwRDZqUUFqbnE0dnJMRzE6Q1lCcFZZaFNlcVN5NEdTUg==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials'
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
</body>
</html>
Hope to help to fix and improve the experience!