qianqiusui126 / oauth-php

Automatically exported from code.google.com/p/oauth-php
0 stars 0 forks source link

Support setting store parameters #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using the MySQL store, I didn't find an easy way to specify all of the 
parameters (username, 
password, host, database name) in the code. Some parameters can be easily set 
as part of default 
config, but others cannot.

What version of the product are you using? On what operating system?
Revisions 96 and 120

Please provide any additional information below.
I have patched revision 120 with a means of doing this if you are interested in 
looking at it.  I don't 
claim that it is the best, but it works.

Original issue reported on code.google.com by tommo...@gmail.com on 13 May 2010 at 12:11

GoogleCodeExporter commented 9 years ago
You can do that with this command:

OAuthStore::instance('MySQL', array(......));

but please post your suggestion.

Original comment by brunobg%...@gtempaccount.com on 13 May 2010 at 11:41

GoogleCodeExporter commented 9 years ago
This works when using OAuthStore directly, but in cases where OAuthServer or 
OAuthRequestVerifier are used, 
the defaults are used. My changes are simply a means of passing the parameters 
for the OAuthStore constructor 
to OAuthServer and OAuthRequestVerifier.

Original comment by tommo...@gmail.com on 14 May 2010 at 12:32

GoogleCodeExporter commented 9 years ago
You can init the OAuthStore instance before calling OAuthServer or any other 
class...
Doesn't that solve it?

Original comment by brunobg%...@gtempaccount.com on 17 May 2010 at 2:46

GoogleCodeExporter commented 9 years ago

Original comment by brunobg%...@gtempaccount.com on 4 Jun 2010 at 2:51