GMOD/Apollo — pull request #117 by cmdcolin (2014-12-17 02:27:01+00:00)
Title: Oauth and drupal logins

Pull request for Drupal and OAuth login code from @spficklin

It's not ready for production yet but I wanted to create the pull request to track this issue

The main problems now are that

- Both DrupalUserAuthentication and OauthUserAuthentication load config files directly instead of using a config file manager. This means that they should have access to a servlet context when starting up, but currently that is not available. Needs to be refactored.

- Tried testing out the google oauth by registering an API key and everything but I still get a crash

java.lang.NullPointerException
at com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
at com.google.api.client.json.jackson.JacksonFactory.createJsonParser(JacksonFactory.java:76)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at org.bbop.apollo.web.user.oauth.OauthUserAuthentication.validateUser(OauthUserAuthentication.java:175)
at org.bbop.apollo.web.Login.login(Login.java:122)
at org.bbop.apollo.web.Login.doGet(Login.java:76)