{"action":"created","issue":{"url":"https://api.github.com/repos/gameontext/gameon-mediator/issues/26","repository_url":"https://api.github.com/repos/gameontext/gameon-mediator","labels_url":"https://api.github.com/repos/gameontext/gameon-mediator/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/gameontext/gameon-mediator/issues/26/comments","events_url":"https://api.github.com/repos/gameontext/gameon-mediator/issues/26/events","html_url":"https://github.com/gameontext/gameon-mediator/pull/26","id":139404396,"number":26,"title":"Jwt on open","user":{"login":"ebullient","id":808713,"avatar_url":"https://avatars.githubusercontent.com/u/808713?v=3","gravatar_id":"","url":"https://api.github.com/users/ebullient","html_url":"https://github.com/ebullient","followers_url":"https://api.github.com/users/ebullient/followers","following_url":"https://api.github.com/users/ebullient/following{/other_user}","gists_url":"https://api.github.com/users/ebullient/gists{/gist_id}","starred_url":"https://api.github.com/users/ebullient/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebullient/subscriptions","organizations_url":"https://api.github.com/users/ebullient/orgs","repos_url":"https://api.github.com/users/ebullient/repos","events_url":"https://api.github.com/users/ebullient/events{/privacy}","received_events_url":"https://api.github.com/users/ebullient/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gameontext/gameon-mediator/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T21:53:45Z","updated_at":"2016-03-09T20:09:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gameontext/gameon-mediator/pulls/26","html_url":"https://github.com/gameontext/gameon-mediator/pull/26","diff_url":"https://github.com/gameontext/gameon-mediator/pull/26.diff","patch_url":"https://github.com/gameontext/gameon-mediator/pull/26.patch"},"body":"Move processing of JWT earlier when connecting to mediator\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/gameontext/gameon-mediator/26)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/gameontext/gameon-mediator/issues/comments/194484461","html_url":"https://github.com/gameontext/gameon-mediator/pull/26#issuecomment-194484461","issue_url":"https://api.github.com/repos/gameontext/gameon-mediator/issues/26","id":194484461,"user":{"login":"BarDweller","id":4990258,"avatar_url":"https://avatars.githubusercontent.com/u/4990258?v=3","gravatar_id":"","url":"https://api.github.com/users/BarDweller","html_url":"https://github.com/BarDweller","followers_url":"https://api.github.com/users/BarDweller/followers","following_url":"https://api.github.com/users/BarDweller/following{/other_user}","gists_url":"https://api.github.com/users/BarDweller/gists{/gist_id}","starred_url":"https://api.github.com/users/BarDweller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BarDweller/subscriptions","organizations_url":"https://api.github.com/users/BarDweller/orgs","repos_url":"https://api.github.com/users/BarDweller/repos","events_url":"https://api.github.com/users/BarDweller/events{/privacy}","received_events_url":"https://api.github.com/users/BarDweller/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T20:09:13Z","updated_at":"2016-03-09T20:09:13Z","body":"\n\n\n\nReview status: 0 of 8 files reviewed at latest revision, 5 unresolved discussions.\n\n---\n\n*[mediator-app/src/main/java/net/wasdev/gameon/mediator/PlayerConnectionManager.java, line 95 \\[r1\\]](https://reviewable.io:443/reviews/gameontext/gameon-mediator/26#-KCRwz4AnH4Bt-yEkLk2:-KCRwz4AnH4Bt-yEkLk3:326486960) ([raw file](https://github.com/gameontext/gameon-mediator/blob/7feb26d0fdc799d2610d606256e2579a4b3d1a1c/mediator-app/src/main/java/net/wasdev/gameon/mediator/PlayerConnectionManager.java#L95)):*\nAny ideas on the lifecycle differences between static and @ApplicationScoped via @PostConstruct here? I think in our case they'll be equivalent. \n\n---\n\n*[mediator-app/src/main/java/net/wasdev/gameon/mediator/PlayerConnectionManager.java, line 224 \\[r1\\]](https://reviewable.io:443/reviews/gameontext/gameon-mediator/26#-KCRxRJNMdO0Oh6tBOGw:-KCRxRJO6DT9NElTvA1c:1285495549) ([raw file](https://github.com/gameontext/gameon-mediator/blob/a8993ce733d6f5ef84954cae4686398cff4099d9/mediator-app/src/main/java/net/wasdev/gameon/mediator/PlayerConnectionManager.java#L224)):*\nShould we test here if the jwt is non null .. in case this method gets invoked somehow before the validate one that pops it in the session.. and we could call it 'serverJwt' or something to give a hint as to why it isn't the client jwt that came in on the request.\n\n---\n\n*[mediator-app/src/main/java/net/wasdev/gameon/mediator/PlayerServerEndpoint.java, line 106 \\[r1\\]](https://reviewable.io:443/reviews/gameontext/gameon-mediator/26#-KCRyW4YPfnT0CSsyQig:-KCRyW4YPfnT0CSsyQih:-1265187413) ([raw file](https://github.com/gameontext/gameon-mediator/blob/a8993ce733d6f5ef84954cae4686398cff4099d9/mediator-app/src/main/java/net/wasdev/gameon/mediator/PlayerServerEndpoint.java#L106)):*\nso umm.. what happens if it does take that long..  or longer (say if running on a raspberry pi)\n\n---\n\n*[mediator-app/src/main/java/net/wasdev/gameon/mediator/auth/JWT.java, line 71 \\[r1\\]](https://reviewable.io:443/reviews/gameontext/gameon-mediator/26#-KCRypf8zZy4jCzYAlii:-KCRypf8zZy4jCzYAlij:-204473718) ([raw file](https://github.com/gameontext/gameon-mediator/blob/a8993ce733d6f5ef84954cae4686398cff4099d9/mediator-app/src/main/java/net/wasdev/gameon/mediator/auth/JWT.java#L71)):*\nnice =)\n\n---\n\n*[mediator-app/src/main/java/net/wasdev/gameon/mediator/auth/JWT.java, line 81 \\[r1\\]](https://reviewable.io:443/reviews/gameontext/gameon-mediator/26#-KCRz-wok8cJrX-cSa7V:-KCRz-wok8cJrX-cSa7W:-2093950500) ([raw file](https://github.com/gameontext/gameon-mediator/blob/a8993ce733d6f5ef84954cae4686398cff4099d9/mediator-app/src/main/java/net/wasdev/gameon/mediator/auth/JWT.java#L81)):*\nI can't help but think a for loop with a break statement could have made this if check redundant.. \nIter over the list, if you find something, process it then break out, else loop.. init code to missing jwt pre-loop, and if you fall out the end of the loop, then all's ready to go.. (may need to clear code for success.. but it's a little undefined what get failurecode should return if state is passed)\n\n---\n\n\n*Comments from the [review on Reviewable.io](https://reviewable.io:443/reviews/gameontext/gameon-mediator/26)*\n<!-- Sent from Reviewable.io -->\n"}}