davinkevin / AngularStompDK

Angular service to communicate to Stomp-Websocket
http://davinkevin.github.io/AngularStompDK/
Apache License 2.0
36 stars 12 forks source link

Stomp cannot connect anywhere outside of app config #44

Closed ghost closed 8 years ago

ghost commented 8 years ago

Cannot use AngularStompDK unless your app has the URL, username/password etc. hard-coded into it. That is certainly too bad, it is a very nice library other than this.

davinkevin commented 8 years ago

What do you propose ? I'm open to suggestion / PR to do that. Until now, this element wasn't a problem, so if you need it, we can work together on it to find the best solution.

Right now, the credential is set during the config phase, what is your use-case ? We have to take in consideration the system automatically connect to the remote stomp endpoint, so if we change the way the config is provided, we have to disable (automatically or not) the auto-connection.

ghost commented 8 years ago

Scenario: username & shared secret (not necessarily password) are not known at program "boot." User must log in to website before they can be known. Alternately, user's sessionid must be loaded from cookie, and a query then made to the website to establish their identity. Alternately, user may log out and then log in as a different user.

Currently, I am changing the settings of the ngstomp object directly, forcing a disconnect, and then calling connect(). This seems to be work, though it is not working as reliably as I'd like it, because sometimes at startup it will error out in sock.js saying "connection is not established yet."

davinkevin commented 8 years ago

So, modifying the settings after the config phase would be something interesting for you. You also need to have possibility to disable auto-connection.

I think this is simple to do, I'll try to do my best with the time I have right now, but if your are interesting of contribute to the project, I let you propose a Pull Request.

Thanks

ghost commented 8 years ago

Thank you, that would be wonderful.

Unfortunately I'm very ignorant of ES, I am working on the Python side of a large project and only tinkering with the JavaScript. Angular is still a bit above my head.

On Aug 28, 2016, at 11:41 PM, Davin Kevin notifications@github.com wrote:

So, modifying the settings after the config phase would be something interesting for you. You also need to have possibility to disable auto-connection.

I think this is simple to do, I'll try to do my best with the time I have right now, but if your are interesting of contribute to the project, I let you propose a Pull Request.

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

davinkevin commented 8 years ago

It's added to the version 0.10.0, tell me if all is good for you ;)