This version (2017/05/27 13:44) is a draft.
Approvals: 0/1

[10:31:50] <temporalfox> pmlopes hi

[10:31:58] <pmlopes> hello

[10:35:04] <temporalfox> I'm looking a bit at the code translated examples

[10:35:08] <temporalfox> there is one for auth

[10:35:15] <temporalfox> it uses

[10:35:15] <temporalfox> context.setUser(null);

[10:35:24] <temporalfox> that does not work in JS / Ruby because we don't support null

[10:35:34] <temporalfox> and the doc says

[10:35:36] <temporalfox> “Set the user. Usually used by auth handlers to inject a User. You will not normally call this method.”

[10:35:44] <temporalfox> can we use an alternative ?

[10:36:11] <temporalfox> or add somewhere a logout() method

[10:42:29] <pmlopes> temporalfox: add a logout will force an API change on Routing context and update all auth related handlers…

[10:42:58] <temporalfox> pmlopes how does usually one logout with this api ?

[10:47:34] <pmlopes> it depends on the auth providers, for stateless providers (jwt) there is no concept of logout since the state only lives during the request, in the end of the request, there is nothing more on the server, for stateful providers backed by cookies then the cookie manages the lifespan of the session, in this case we need to invalidate the session with setSession(null) or invalidate the user with setUser(null) so in either case it will fail for you

[10:47:34] <pmlopes> since we are setting “null”…

[10:48:58] <pmlopes> i think the cleaner would be to add a “destroySession()” or some better naming…

[10:49:44] <temporalfox> isn't something we should care about for 3.0 ?

[10:53:00] <temporalfox> it does not fail for me, it fails for Ruby or JS :-)

[10:54:20] <pmlopes> well if it does not work for JS and Ruby then it means we have a broken API for those languages ;)

[10:55:31] <pmlopes> i think we should also discuss with purplefox about adding a destroySession() method to Routing context, however this would still call a setter to null somewhere, wouldn't this also cause trouble with the codegen later on?

[10:58:13] <temporalfox> pmlopes if we do have destroySession that does setUser(null) it's fine because it's the destroySession method that is code generated

[10:58:29] <temporalfox> and the setWhateger(null) is the Java impl

[11:02:42] <purplefox> temporalfox: session has a destroy() method

[11:02:48] <purplefox> temporalfox: but….

[11:02:58] <temporalfox> right now

[11:03:01] <temporalfox> the code is

[11:03:01] <temporalfox> router.route(“/logout”).handler(context → {

[11:03:01] <temporalfox> context.setUser(null);

[11:03:01] <temporalfox> Redirect back to the index page [11:03:01] <temporalfox> context.response().putHeader(“location”, “/”).setStatusCode(302).end(); [11:03:01] <temporalfox> }); [11:03:15] <purplefox> temporalfox: but you don't want to kill the whole session just to log out a user [11:03:26] <temporalfox> that's the auth Server example [11:03:29] <temporalfox> yeah… [11:03:35] <purplefox> temporalfox: btw, Javascript does have a concept of “null”, and Ruby has “nil2 [11:03:37] <purplefox> nil [11:03:39] <temporalfox> yes [11:03:42] <temporalfox> the problem is dispatch [11:03:47] <temporalfox> with no overloading [11:03:53] <temporalfox> we could assume that null is ok [11:04:04] <temporalfox> (which is currently the case in this design) [11:04:23] <temporalfox> here is the current generated code [11:04:24] <temporalfox> if (args.length === 1 && typeof args[0] === 'object' && __args[0]._jdel) { [11:04:24] <temporalfox> j_routingContext[“setUser(io.vertx.ext.auth.User)”](user._jdel); [11:04:24] <temporalfox> } else utils.invalidArgs(); [11:04:55] <temporalfox> so in this situation we could do better [11:04:57] <purplefox> i think it would be ok to add a method RoutingContext.logOut() or something (which just called setUser(null) internally) [11:04:58] <pmlopes> yes i was looking at the session and just saw the destroy there [11:05:18] <temporalfox> purplefox that would be a simpler solution indeed [11:05:26] <pmlopes> we can just do ctx.session().destroy() [11:05:31] <temporalfox> later we can think about null args when there is no overloading [11:05:39] <purplefox> i don't think destroying the session is a good idea [11:05:49] <purplefox> log in and session might have different lifetimes [11:06:30] <purplefox> i'm not sure logout is the right word though [11:06:39] <purplefox> maybe “unAuthenticate” ? [11:07:28] <pmlopes> that feels too long… my tong rolls 3 times before i finish pronouncing that :) [11:08:09] <purplefox> lol [11:10:51] <purplefox> naming - the hardest problem in computer science ;) [11:12:13] <purplefox> purplefox: temporalfox pmlopes : folks I'm going to have to spend some time writing my presentation for the MSA day on Thursday :( [11:12:27] <purplefox> so probably won't get much V3 work done today [11:12:33] <temporalfox> purplefox I do have a vertx pres on thursday too :-) [11:12:42] <temporalfox> if you can share that's cool [11:12:52] <purplefox> ha, i was going to ask you the same thing ;) [11:12:53] <temporalfox> so I can improve it with new ideas [11:13:03] <temporalfox> mine is a bit like the old one you have [11:13:10] <temporalfox> but with the reactive dashboard example [11:13:21] <temporalfox> but there is no much web in my pres [11:13:22] <purplefox> can i have a look at your latest one? i think it's newer than mine [11:13:27] <temporalfox> although I like the example [11:13:32] <temporalfox> because it can be followed [11:13:38] <temporalfox> (but now we do have many examples) [11:13:46] <purplefox> but this talk is specifically about microservices, so i'm going to have write a lot of new stuff i think [11:13:50] <temporalfox> yes [11:14:09] <temporalfox> btw I did a presentation on “demystifying the event loop” 3 weeks ago [11:14:12] <temporalfox> based on the article [11:14:27] <temporalfox> it's a kind of more advanced for ppl that already know about vertx [11:19:10] <cescoffier> purplefox - when I launch vertx run -ha (to get a bare instance), it yells ;-). It works but there is a stack trace complaining about not being able to load the `-ha` verticle (which makes sense). Bug or expected behavior ? [11:20:44] <cescoffier> (the stack trace: [11:21:07] <purplefox> cescoffier: can you tell me the exact command line you are using? [11:21:26] <purplefox> for a bar instance it should be “vertx -ha” [11:21:29] <cescoffier> vertx run -ha -cluster-host [11:21:31] <purplefox> s/bar/bear [11:21:40] <cescoffier> hum ok, let me try that [11:21:42] <purplefox> ah ok, remove the “run” [11:22:27] <cescoffier> nope… it prints the 'usage' [11:24:27] <cescoffier> so probably a bug [11:24:30] <purplefox> ok, sounds like a bug, yes [11:25:53] <pmlopes> temporalfox: going back to the logout what about “unsetUser()” ? instead of logOut or unAuthenticate [11:25:58] <cescoffier> ok, will have a look. [11:26:32] <temporalfox> pmlopes how about clearUser ? [11:26:44] <pmlopes> alsofine [11:26:47] <pmlopes> also fine [11:28:18] <temporalfox> let me know when I can test again :-) [11:29:55] <purplefox> temporalfox: +1 on clearUser() [11:38:10] <purplefox> temporalfox: what tool did you use to write your prez? [11:38:17] <temporalfox> powerpoint [11:38:23] <temporalfox> I would like to switch to reveal.js [11:38:33] <temporalfox> or something like that [11:38:50] <temporalfox> so it can reuse easily the theme we do have for 3.0 [11:39:15] <purplefox> powerpoint! What is this, 1995? ;) [11:39:16] <temporalfox> I mean we can maybe ask Michel to adapt a reveal.js theme :-) [11:39:30] <purplefox> +1 [11:39:39] <temporalfox> purplefox I use what is easy to use on my machine [11:39:51] <temporalfox> and it's better than open office [11:39:54] <temporalfox> for the UI [11:47:23] <purplefox> can i have a look at it? [11:49:59] <temporalfox> sure [11:50:56] <temporalfox> acutally it's in french [11:51:01] <temporalfox> do you still want it :) ? [11:51:34] <cescoffier> purplefox - fixed the bare stuff, gonna do a PR after lunch [11:51:43] <purplefox> temporalfox: yes please [11:52:16] <temporalfox> sent [11:53:02] <temporalfox> the dashboard project is here : [12:02:16] <purplefox> thx [12:23:24] <pmlopes> temporalfox: i've made a PR for the clearUser [20:25:38] <namrood> purplefox, what's wrong the eclipse CLA? [22:46:59] <aesteve> hi everyone :) [23:08:28] <AlexLehm> what is the valid range for timer ids? I think I introduced a bug into my code by calling cancelTimer(0) [23:36:52] <AlexLehm> ok, i cancelled the timer in my test class by accident