private function OAuthServer::get_version in OAuth 1.0 6.3
Same name and namespace in other branches
- 6 OAuth.php \OAuthServer::get_version()
- 7.3 lib/OAuth.php \OAuthServer::get_version()
version 1
3 calls to OAuthServer::get_version()
- OAuthServer::fetch_access_token in lib/
OAuth.php - process an access_token request returns the access token on success
- OAuthServer::fetch_request_token in lib/
OAuth.php - process a request_token request returns the request token on success
- OAuthServer::verify_request in lib/
OAuth.php - verify an api call, checks all the parameters
File
- lib/
OAuth.php, line 582 - OAuth 1.0 server and client library.
Class
Code
private function get_version(&$request) {
$version = $request
->get_parameter("oauth_version");
if (!$version) {
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
// Chapter 7.0 ("Accessing Protected Ressources")
$version = '1.0';
}
if ($version !== $this->version) {
throw new OAuthException("OAuth version '{$version}' not supported");
}
return $version;
}