PHPoAuthLib icon indicating copy to clipboard operation
PHPoAuthLib copied to clipboard

Suggested method to authenticate against sandbox / test environment?

Open aaronbauman opened this issue 7 years ago • 1 comments

I see many of the OAuth Service providers have hard-coded endpoints for production services. e.g. login.salesforce.com, www.paypal.com, etc.

For my application, I need flexibility to set the endpoint base URL differently, based on my SLDC. What's the recommended way to do this? Just extend the class and override those methods?

If that's the recommendation, would you consider a patch to include a more robust framework to swap out the endpoints? Or is this overkill?

Thanks for your work on this.

aaronbauman avatar Jul 27 '18 14:07 aaronbauman

Yeah honestly with the way the code structure is right now your best bet is extending the class and overriding the methods, naming the derived class something indicating it targets a different environment.

If you have a proposal for making it cleaner let me know, I'd accept a PR that doesn't break BC and is reasonably clean - I know the design isn't currently ideal

daviddesberg avatar Jul 28 '18 18:07 daviddesberg