krzysztofgawrys / oauth

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

PHP: Add access token renewal api on oauth server #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I might have overlooked something, but I could not find a easy way to renew 
access tokens (as in: when access token has expired you would want to 
exchange out dated access token + original verifier for a new access token).

So attached is a patch that does exactly that.
It changes api slightly on OAuthDataStore->lookup_token to include flag for 
when to check token ttl and when to ignore it, this just felt like the most 
straight forward way to do it.

Original issue reported on code.google.com by andre.ro...@gmail.com on 20 May 2010 at 4:58

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by jmkrist...@gmail.com on 24 May 2010 at 3:30

GoogleCodeExporter commented 9 years ago
OAuth 1.0 has no set notion of access token renewal. Are you referring to the 
new 2.0-draft? 
In that case, the rest of the library hasn't been updated to work with 
2.0-draft yet, as I haven't had the time to 
properly read through the specs yet?

-Morten

Original comment by morten.f...@gmail.com on 28 May 2010 at 7:12

GoogleCodeExporter commented 9 years ago
No, I was suggesting an api so implementers don't have to hack one for their 
custom 
"renew" rpc call.

As for 2.0, as I see it, it is so much simpler it should have it's own lib. If 
you 
create one that handles both, fine, but it will make implementation for those 
that 
only want 2.0 so much harder that they gets something up faster by coding it 
them self 
instead just using curl and so on (IMHO).

Original comment by andre.ro...@gmail.com on 28 May 2010 at 7:37