private function OAuthServer::get_token in OAuth 1.0 6
Same name and namespace in other branches
- 6.3 lib/OAuth.php \OAuthServer::get_token()
- 7.3 lib/OAuth.php \OAuthServer::get_token()
try to find the token for the provided request's token key
2 calls to OAuthServer::get_token()
- OAuthServer::fetch_access_token in ./
OAuth.php - process an access_token request returns the access token on success
- OAuthServer::verify_request in ./
OAuth.php - verify an api call, checks all the parameters
File
- ./
OAuth.php, line 570
Class
Code
private function get_token(&$request, $consumer, $token_type = "access") {
/*{{{*/
$token_field = @$request
->get_parameter('oauth_token');
$token = $this->data_store
->lookup_token($consumer, $token_type, $token_field);
if (!$token) {
throw new OAuthException("Invalid {$token_type} token: {$token_field}");
}
return $token;
}