By Developers, For Developers

Historical errata for Programming Google Glass

PDF PgPaper PgTypeDescriptionFixed onComments
42ERROR

The isRedirectable method as given in the book only matches URLs that exactly match the OAUTH2_PATH:

private boolean isRedirectable(HttpServletRequest request) {

return !request.getRequestURI().equals( AuthUtils.OAUTH2_PATH );

}

However, when I actually try to access the OAuth2 signin URL, it adds on a “;jsessionid=1q6pjgmklvftk” on the end, so now the .equals() returns false. I had to change the .equals() to .contains() so that the match would still occur (otherwise I’d get infinitely redirected to the /oauth2callback URL).

2013-12-24Thank you for catching this! I never ran across this session case, but you're absolutely correct on the fix. I'll patch the github code. \n \nEric
26TYPO

“The LunchRouletteServlet.java file
will contain the code we’re going write and the…” [sic]

should be “… the code we’re going [to] write…”

2014-03-25Thanks, it'll be fixed in the next release
77ERROR

Chapter 4: LunchRoulette.java getLunchRouletteId method the following line:

return (String) userData.getProperty(“lunchRouletteId”);

should be:

return (String) userData.getProperty(“lastId”);

2014-02-05Thanks for the note. It's been fixed in the github repo code: https://github.com/coderoshi/glassmirror
516ERROR

The description and screen shot of registering your application (Figure 9) with OAUTH is incorrect. The Registering your apps link no longer exists and you have to register origins etc. in the credential section.

Note: I’m using Kindle - hence the crazy Page number.

2014-10-15It should be fixed in the updated download. Thanks for pointing this out.

Categories: