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)
- Minor fix that allows for the implementation of your OAuthStore
- OAuth POST request combines parameters from original server request with parameters being sent via oauth for Oauth consumers HOT 1
- Array of Array
- No server associated with consumer_key "..."
- Putting project to packagist
- Saving Recurring events from Google calendar api
- connect Oauth(PHP) Client to Oauth server (ruby on rails)
- cgi sapi oauth callback is required hot fix available
- Error with OAuth instance 2legged
- Invalid consumer HOT 1
- remote server request error
- Error when creating tables with foreign key constraints
- POST data included in signature when content type is "multipart/form-data" HOT 4
- I get error "Authorized token from Service Provider does not match supplied Request Token details"
- Patch for /trunk/example/client/twoleggedtwitter.php
- OAuth Verification Failed HOT 1
- oAuth with PHP 4.4.9
- where is the updateConsumer function? HOT 1
- [deleted issue]
- SQL bug (with fix) in PostgreSQL Store checkServerNonce method
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.