jbelien / oauth2-openstreetmap

OpenStreetMap OAuth 2.0 support for the PHP League's OAuth 2.0 Client
MIT License
3 stars 2 forks source link

options to change the default server urls #49

Open Cyrille37 opened 4 months ago

Cyrille37 commented 4 months ago

Hi,

I just propose to permit the change of server urls, it's some times useful ;-)

The default behavior of the Provider does not change, just 2 new optional options.

The README talk about them :

$OpenStreetMapProvider = new \JBelien\OAuth2\Client\Provider\OpenStreetMap([
    'clientId'     => 'yourId',          // The client ID assigned to you by OpenStreetMap.org
    'clientSecret' => 'yourSecret',      // The client password assigned to you by OpenStreetMap.org
    'redirectUri'  => 'yourRedirectUri', // The return URL you specified for your app on OpenStreetMap.org
    'dev'          => false              // Whether to use the OpenStreetMap test environment at https://master.apis.dev.openstreetmap.org/
    /*
    For a particular need you can change the default server urls with this two options:
    'osm_base_url' =>  'https://www.openstreetmap.org',
    'osm_base_url_dev' => 'https://master.apis.dev.openstreetmap.org',
    */
]);

Thanks and cheers :-)

Cyrille37 commented 3 months ago

Hi @jbelien Thanks you for having a look at this PR. Don't hesitate to ask me for corrections and improvements ;-)

Cyrille37 commented 2 months ago

Hi @jbelien Will you accept this PR ? Any requirement ? Thanks & cheers