I haven't seen this addressed, but if using Scribe to connect to Oauth API having multiple endpoints such as: sandbox, test, production, What would be the best way to declare this logic dynamically in the existing code or how could we extend this? Or, does this exist and I'am simply missing something?
An example would be the GoogleApi class org.scribe.builder.api.GoogleApi.java, the following assessor is hard coded:
public String getRequestTokenEndpoint()
If Google, had a sandbox for testing, like a few other vendors do, what would be the best way from the code implementation to switch to, for example, https://sandbox.google.com/accounts/OAuthGetRequestToken
Could we get to something like the below snippet where I've injected .requestToken("sandbox")?
OAuthService service = new ServiceBuilder()
Thanks in advance.
that's why god invented inheritance, see:
just noticed that indentation on that class is fucked as fuck.