Comments (6)
Hello uweiss,
Is it correct when I understand that you would like your service provider to:
- receive additional parameters when handling the request-token request
- save these received with the request-token.
I assume the $server->authorizeVerify() will then also need to return those
extra parameters. As will the
$store->getConsumerRequestToken(), $store->getConsumerAccessToken().
Maybe we should also let the $consumer->requestRequestToken() add extra
parameters to the outgoing
request.
Any extra ideas?
- Marc
Original comment by [email protected]
on 13 Jul 2008 at 6:05
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from oauth-php.
hi Marc,
Yes and no. Handling and saving extra parameters is certainly an option from
within
the library, but it is not really necessary. A user of the library can access
these
parameters pretty well with $server->getParameter('param_name'). The problem I
had
was actually associating this parameter with a token (or ost_id), which was not
possible when calling $s->requestToken(), because it exits. I rewrote that
function
and inserted some of my own code for fetching the ost_id and saving the
parameters in
my own parameter table, where I also save other things like expiration of the
token
(which will be set by the user on the authorization step). It would be nice if
$s->requestToken() returned the ost_id.
See http://proofile.org/apidoc/oauth for how I am using these parameters.
yes, $c->requestRequestToken() should be able to have parameters added (6.1.1 of
http://oauth.net/core/). Also, on a side note, a caller should be enabled to
change
the http request method (GET, or anything else, instead of just POST).
keep up the good work, I really like the library.
ueli
Original comment by [email protected]
on 14 Jul 2008 at 10:31
from oauth-php.
Hi Ueli,
I propose to change OAuthServer::requestToken() so that it returns the new
request_token, and does not call exit() anymore.
OAuthRequester::requestRequestToken() will be changed to accept additional
parameters and also an optional http request method.
In OAuthServer:
/**
* Handle the request_token request.
* Returns the new request token and request token secret.
*
* TODO: add correct result code to exception
*
* @return string returned request token, false on an error
*/
public function requestToken ()
And in OAuthRequester:
/**
* Request a request token from the site belonging to consumer_key
*
* @param string consumer_key
* @param int usr_id
* @param array params (optional) extra arguments for when requesting the request token
* @param string method (optional) change the method of the request, defaults to POST (as it should be)
* @exception OAuthException when no key could be fetched
* @exception OAuthException when no server with consumer_key registered
* @return array (authorize_uri, token)
*/
static function requestRequestToken ( $consumer_key, $usr_id, $params = null, $method = 'POST' )
Would this help you and fix the problems you encountered?
- Marc
Original comment by [email protected]
on 16 Jul 2008 at 3:52
from oauth-php.
perfect, thanks marc!
Original comment by [email protected]
on 16 Jul 2008 at 4:10
from oauth-php.
I committed the proposed changes.
See revision 45.
Also adapted the documentation for the OAuthServer
Original comment by [email protected]
on 16 Jul 2008 at 4:25
from oauth-php.
Will start testing.
Original comment by [email protected]
on 16 Jul 2008 at 4:26
- Changed state: Fixed
from oauth-php.
Related Issues (20)
- Example server code does not seem to be storing session for testing HOT 3
- OAuthStoreAnyMeta references out-of-project include HOT 1
- Signed request with trailing & on url HOT 3
- OAuthRequest.php: No Hostname/Port detected when using http://localhost:8888/Bla/index.php, for example. HOT 2
- Remove $_SESSION dependency HOT 17
- Add some very simple DB wrapper so we can use mysqli or PDO instead of mysql_* HOT 47
- Verification of signature failed when query string is included in oAuth Request HOT 2
- Can unzip .tar.gz HOT 1
- Incompatible with PECL's OAuth HOT 1
- Support for MySQLi HOT 1
- osr_callback_uri is never read HOT 1
- Improper OAuthException22 referenced in OAuthStoreMySQL HOT 1
- RSA-SHA1 becomes RSA_SHA1 when sent to server HOT 1
- Undefined index 'host' in OAuthRequest on line 513 HOT 1
- Fatal error: Class 'OAuthException22' not found HOT 2
- is Mysql or any other database required to for oauth store for consumer? can we store the info in sessions HOT 10
- Get client ID or consumer_key from OAuthRequestVerifier HOT 2
- No support for duplicate consumer keys
- OAuth Core 1.0 Revision A Compatibility HOT 25
- Content-Type missed in POST HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth-php.