joscha / play-authenticate

An authentication plugin for Play Framework 2.x (Java)
http://joscha.github.com/play-authenticate/
Other
807 stars 367 forks source link

setting the google configuration dynamically #236

Open strattonbrazil opened 9 years ago

strattonbrazil commented 9 years ago

I have a small project who's code is hosted publicly, so I want to set the Google client ID and secret using environment variables set before the program starts. Is there a way to do this in play-authenticate so I don't have to hard-code them into the conf file?

joscha commented 9 years ago

Technically you might be able to set the client ID directly into the configuration like we do it in the tests: https://github.com/joscha/play-authenticate/blob/master/samples/java/play-authenticate-usage/test/test/OAuth2Test.java and https://github.com/joscha/play-authenticate/blob/master/samples/java/play-authenticate-usage/test/test/GoogleOAuth2Base.java I haven't tried that in production yet, though.