"Unable to identify proxy for host: secure and url: /loginapp/login" , oauth-advanced (apigee- api platform samples)

Not applicable

I am trying to get the oauth sample up and running for test purpose, to understand how its implemented so as to implement it in my APIs, or probably use it as a whole.

oauth-advanced Github apigee api platform samples

I followed the steps mentioned in the above link. Everything gets deployed.

I even tried different environments, i.e., test and prod.

I have manually checked for the proxies in my Edge too, and yes they are there.

This is what i end up with every time.

{"fault":{"faultstring":"Unable to identify proxy for host: secure and url: \/loginapp\/login","detail":{"errorcode":"messaging.adaptors.http.flow.ApplicationNotFound"}}}

Please help me out.

Thanks

0 6 1,484
6 REPLIES 6

HI @rohan - Few questions:
1) Can you confirm if the proxy is deployed ? You can find it by checking the green icon next to the environments drop down in the Overview or Develop tab

2) Are you using a trial org ?

3) Can you confirm you have a Virtual host called "secure" ? You might want to check in the Environment Configurations?

4) Can you provide the curl command you are running ?

Thank you for your reply,

1. Yes, the proxies are deployed except the login-app, which i tried deploying by going in and selecting "test" as deployment, but it says at least a single proxy is required for deployment.

5288-screenshot-from-2017-07-13-20-05-10.png

5289-screenshot-from-2017-07-13-20-07-52.png

2.Yes, it's a trial organisation.

3. Can you please provide me more details? I don't know where to look for it exactly.

4. oauth-advanced has implemented the ui for this process. so the first link I visit after deployment is

http://rohan183chougule-trial-test.apigee.net/web

It displays a button for further login process. but doesn't proceed as it is supposed to.

Hi @rohan

I was able to follow the steps provided in the README and it worked as expected. At least I was able to hit the /web URL

Can you please confirm if the yeoman setup completed successfully ? Also can you confirm if you provided correct information to the questions asked - like org name, env, etc

In my case, these are the info I provided:

$ yo oauth-auth-code-grant-sample


     _-----_
    |       |    ╭──────────────────────────╮
    |--(o)--|    │    Welcome to Yeoman,    │
   `---------´   │   ladies and gentlemen!  │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `


Sample Generator of OAuth Authorization Code Grant Type Proxies.
? Your user name my-email-id
? Password [hidden]
? Management API URL Endpoint https://api.enterprise.apigee.com
? Organization Name saisarantest
? Environment Name test

It did a bunch of things and at the end, it printed that the proxy deployments are good and the URI is https://saisarantest-test.apigee.net/web that takes me to a page with a button which leads me to register and generate an access token (with the 3 legged flow)

NOTE: In the README, there was a note about this not working on Windows, wondering if you are running it on Windows?

Thanks for the effort.

Even i followed the steps as said. I installed yeoman properly too. It asked for my details the way you have mentioned. and had I provided the details wrong, i am sure nothing would have got deployed.

Though, the only issue i got was, the login-app proxy didn't had any proxies deployed in it. So i thought of giving it a manual try. and i deployed the oauth-login-app separately. thus, i was able to get till the login and registration page. but when i register, i got the following error

ReferenceError: "basePath" is not defined.
    at /organization/environment/api/node_modules/ejs/lib/ejs.js#237(Function):17
    at /organization/environment/api/node_modules/ejs/lib/ejs.js#237(Function):16
    at /organization/environment/api/node_modules/ejs/lib/ejs.js:250
    at /organization/environment/api/node_modules/ejs/lib/ejs.js:288
    at /organization/environment/api/node_modules/ejs/lib/ejs.js:318
    at /organization/environment/api/node_modules/ejs-locals/index.js:85
    at render (/organization/environment/api/node_modules/express/lib/view.js:128)
    at tryRender (/organization/environment/api/node_modules/express/lib/application.js:640)
    at render (/organization/environment/api/node_modules/express/lib/application.js:592)
    at render (/organization/environment/api/node_modules/express/lib/response.js:971)
    at /organization/environment/api/routes/registration.js:104
    at emit (events.js:95)
    at _stream_readable.js:764
    at emit (events.js:92)
    at emitReadable_ (_stream_readable.js:426)
    at emitReadable (_stream_readable.js:422)
    at readableAddChunk (_stream_readable.js:165)
    at _stream_readable.js:127
    at parserOnBody (http.js:142)
    at socketOnData (http.js:1587)
    at tls.js:575
    at tls.js:530

I am not sure where i am going wrong.

and I am on ubuntu 16.04.2 LTS.

I somehow got it working. I installed all the required npm packages again and yeoman as well.

I have one more question.

Now since I have got this example deployed, How do I actually integrate with the API I want to be managed?

Thanks!

But I still get that basePath not defined error when I insert few passwords.