aboutsummaryrefslogtreecommitdiff
path: root/lib/oauth.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2014-09-30 23:13:49 +0200
committerChristian Weiske <cweiske@cweiske.de>2014-09-30 23:13:49 +0200
commiteb5c81dea5a60bc65d3ec607daf5ad81fd709928 (patch)
tree81407f1e67adba222a020e142d0ebfb15a3f5ef3 /lib/oauth.php
parentf38e545235173bb145e4b1c9c29dc2960a0a3389 (diff)
downloadgrauphel-eb5c81dea5a60bc65d3ec607daf5ad81fd709928.tar.gz
grauphel-eb5c81dea5a60bc65d3ec607daf5ad81fd709928.zip
store client name and last use time for tokens. show them in token management
Diffstat (limited to 'lib/oauth.php')
-rw-r--r--lib/oauth.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/oauth.php b/lib/oauth.php
index 5f84e7e..231a177 100644
--- a/lib/oauth.php
+++ b/lib/oauth.php
@@ -111,6 +111,12 @@ class OAuth
}
throw $e;
}
+
+ if (time() - $token->lastuse > 60) {
+ //time to update lastuse after at least a minute
+ $this->tokens->updateLastUse($token->tokenKey);
+ }
+
$provider->token_secret = $token->secret;
return OAUTH_OK;
}
@@ -147,7 +153,7 @@ class OAuth
/**
* Get a new oauth provider instance.
* Used to work around the fastcgi bug in oauthprovider.
- *
+ *
* @return \OAuthProvider
*/
public static function getProvider()