I have a question about securing the event bus bridge. In the vertx-web docs is a code about securing the event bus path:
http://vertx.io/docs/vertx-web/java/#_requiring_authorisation_for_messages
This is a code snippet from the docs:
AuthHandler basicAuthHandler = BasicAuthHandler.create(authProvider);
router.route("/eventbus/*").handler(basicAuthHandler);
router.route("/eventbus/*").handler(sockJSHandler);
But how can i set a Basic Auth Header on the client side with the javascript event bus lib? Or do i have to login the user with „traditional“ HTTP methods and after that open the event bus? Do you have a working example with server and client code?
Thanks in Advance
I have a question about securing the event bus bridge. In the vertx-web docs is a code about securing the event bus path:
http://vertx.io/docs/vertx-web/java/#_requiring_authorisation_for_messages
This is a code snippet from the docs:
AuthHandler basicAuthHandler = BasicAuthHandler.create(authProvider);
router.route("/eventbus/*").handler(basicAuthHandler);
router.route("/eventbus/*").handler(sockJSHandler);
But how can i set a Basic Auth Header on the client side with the javascript event bus lib? Or do i have to login the user with „traditional“ HTTP methods and after that open the event bus?
Do you have a working example with server and client code?
--
Thanks in Advance
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/e986c51a-d2b7-4366-a4ce-53fee07cf1b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 12/08/15 10:49, Tarek wrote:
I have a question about securing the event bus bridge. In the vertx-web docs is a code about securing the event bus path:
http://vertx.io/docs/vertx-web/java/#_requiring_authorisation_for_messages
This is a code snippet from the docs:
AuthHandler basicAuthHandler = BasicAuthHandler.create(authProvider);
router.route("/eventbus/*").handler(basicAuthHandler);
router.route("/eventbus/*").handler(sockJSHandler);
But how can i set a Basic Auth Header on the client side with the javascript event bus lib? Or do i have to login the user with „traditional“ HTTP methods and after that open the event bus?
It would be common to log the user in before opening the event bus. You can use any of the normal vertx-web auth handlers for that (basic, redirect, jwt, etc)