From d20e329ea1d4a0065fb80ab3fa3a24d1f993fcea Mon Sep 17 00:00:00 2001 From: Chris Weber Date: Mon, 15 Apr 2013 23:44:11 +0200 Subject: [PATCH] added google+ oauth 2 example, and updated readme added google+ oauth 2 example updated readme minor fixes --- .gitignore | 4 +- README.md | 76 ++++++++- .../controllers/IndexController.php | 5 +- .../application/Bootstrap.php | 38 +++++ .../application/configs/application.ini | 35 ++++ .../application/configs/routes.ini | 6 + .../controllers/ErrorController.php | 38 +++++ .../controllers/IndexController.php | 149 ++++++++++++++++++ .../application/views/layouts/layout.phtml | 16 ++ .../views/scripts/error/error.phtml | 18 +++ .../scripts/index/googlepluscallback.phtml | 0 .../views/scripts/index/index.phtml | 0 examples/GooglePlusOAuth2/public/.htaccess | 6 + examples/GooglePlusOAuth2/public/index.php | 32 ++++ examples/GooglePlusOAuth2/public/info.php | 3 + .../controllers/IndexController.php | 5 +- library/Chrisweb/Oauth2.php | 32 +--- library/Chrisweb/Oauth2/Config.php | 62 ++------ 18 files changed, 439 insertions(+), 86 deletions(-) create mode 100644 examples/GooglePlusOAuth2/application/Bootstrap.php create mode 100644 examples/GooglePlusOAuth2/application/configs/application.ini create mode 100644 examples/GooglePlusOAuth2/application/configs/routes.ini create mode 100644 examples/GooglePlusOAuth2/application/controllers/ErrorController.php create mode 100644 examples/GooglePlusOAuth2/application/controllers/IndexController.php create mode 100644 examples/GooglePlusOAuth2/application/views/layouts/layout.phtml create mode 100644 examples/GooglePlusOAuth2/application/views/scripts/error/error.phtml create mode 100644 examples/GooglePlusOAuth2/application/views/scripts/index/googlepluscallback.phtml create mode 100644 examples/GooglePlusOAuth2/application/views/scripts/index/index.phtml create mode 100644 examples/GooglePlusOAuth2/public/.htaccess create mode 100644 examples/GooglePlusOAuth2/public/index.php create mode 100644 examples/GooglePlusOAuth2/public/info.php diff --git a/.gitignore b/.gitignore index 392d5aa..207dca4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /examples/FacebookOpenGraphOAuth2/nbproject/ /examples/JamendoApiOAuth2/nbproject/ +/examples/GooglePlusOAuth2/nbproject/ /examples/FacebookOpenGraphOAuth2/application/configs/facebook_api.ini -/examples/JamendoApiOAuth2/application/configs/jamendo_api.ini \ No newline at end of file +/examples/JamendoApiOAuth2/application/configs/jamendo_api.ini +/examples/GooglePlusOAuth2/application/configs/google_plus_api.ini \ No newline at end of file diff --git a/README.md b/README.md index de4597e..d7b1769 100644 --- a/README.md +++ b/README.md @@ -47,18 +47,22 @@ apache vhost.conf ``` ; application/configs/jamendo_api.ini +; http://developer.jamendo.com/v3.0/oauth2 + ; to get a jamendo api account visit: https://devportal.jamendo.com/ ; jamendo api configuration dialogEndpoint = https://api.jamendo.com/v3.0 oauthEndpoint = https://api.jamendo.com/v3.0 -clientId = 000000000 -clientSecret = 00000000000000000000000000000000 -callbackUrl = http://www.mywebsite.dev/jamendocallback +clientId = 0000000000 +clientSecret = 0000000000000000000000000000 +callbackUrl = http://www.jamendoapioauth2.dev/jamendocallback oauthDialogUri = /oauth/authorize accessTokenUri = /oauth/grant -stateSecret = a_secret_phrase +stateSecret = afs4f4g8e4asgaas grantType = authorization_code +requestedRights = music ; = scope +responseType = code ; = response_type ``` Facebook Open Graph API OAuth 2 @@ -98,13 +102,73 @@ apache vhost.conf ``` ; application/configs/facebook_api.ini +; https://developers.facebook.com/docs/howtos/login/server-side-login/ + ; facebook api configuration dialogEndpoint = https://www.facebook.com oauthEndpoint = https://graph.facebook.com -clientId = 0000000000000 +clientId = 000000000000000000 clientSecret = 000000000000000000000000000000 callbackUrl = http://www.facebookopengraphoauth2.dev/facebookcallback +responseType = code ; or token, none, signed_request oauthDialogUri = /dialog/oauth accessTokenUri = /oauth/access_token -stateSecret = a_secret_phrase +stateSecret = afs4f4g8e4asgaas +; permissions https://developers.facebook.com/docs/concepts/login/permissions-login-dialog/ +requestedRights = email,user_actions.music,user_likes +``` + +Google+ API OAuth 2 +------------------------------- + +1) Add the latest Zend Framework and the Chrisweb library to the library directory. + +2) Setup an Apache vhost for the example: + +apache vhost.conf + +``` + + + ServerName www.googleplusoauth2.dev + DocumentRoot /path/to/examples/GooglePlusOAuth2/public + ErrorLog "logs/googleplusoauth2-error.log" + CustomLog "logs/googleplusoauth2-access.log" combined + SetEnv APPLICATION_ENV "development" + + + DirectoryIndex index.php + AllowOverride All + Order allow,deny + Allow from all + + + +``` + +3) Update your hosts file: + +127.0.0.1 www.googleplusoauth2.dev + +4) Create a Google+ API account, then create a configuration file and add the values: + +``` +; application/configs/google_plus_api.ini + +; https://developers.google.com/+/api/oauth + +; google+ api configuration +dialogEndpoint = https://accounts.google.com/o/oauth2 +oauthEndpoint = https://accounts.google.com/o/oauth2 +clientId = 0000000000000000.apps.googleusercontent.com +clientSecret = 00000000000000000000000000000 +responseType = code ; https://developers.google.com/accounts/docs/OAuth2Login#responsetypeparameter +callbackUrl = http://127.0.0.1/googlepluscallback +secretType = +immediate = +oauthDialogUri = /auth +accessTokenUri = /token +stateSecret = afs4f4g8e4asgaas +; google+ scopes https://developers.google.com/+/api/oauth#scopes +requestedRights = https://www.googleapis.com/auth/plus.login,https://www.googleapis.com/auth/plus.me,https://www.googleapis.com/auth/userinfo.email ``` \ No newline at end of file diff --git a/examples/FacebookOpenGraphOAuth2/application/controllers/IndexController.php b/examples/FacebookOpenGraphOAuth2/application/controllers/IndexController.php index fb3893a..638fc13 100644 --- a/examples/FacebookOpenGraphOAuth2/application/controllers/IndexController.php +++ b/examples/FacebookOpenGraphOAuth2/application/controllers/IndexController.php @@ -57,10 +57,7 @@ public function indexAction() */ public function facebookcallbackAction() { - - //Zend_Debug::dump($_GET['code']); - //Zend_Debug::dump($_GET['error_reason']); - + $rawCode = $this->_request->getParam('code', null); $stateParameter = $this->_request->getParam('state', null); $errorReason = $this->_request->getParam('error_reason', null); diff --git a/examples/GooglePlusOAuth2/application/Bootstrap.php b/examples/GooglePlusOAuth2/application/Bootstrap.php new file mode 100644 index 0000000..e2a2632 --- /dev/null +++ b/examples/GooglePlusOAuth2/application/Bootstrap.php @@ -0,0 +1,38 @@ +registerNamespace('Chrisweb'); + + } + + protected function _initDoctype() + { + $this->bootstrap('view'); + $view = $this->getResource('view'); + $view->doctype('HTML5'); + } + + protected function _initRouting() + { + + //Zend_Debug::dump(APPLICATION_PATH.'/configs/routes.ini'); + //exit; + + $config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/routes.ini'); + $frontController = Zend_Controller_Front::getInstance(); + $router = $frontController->getRouter(); + $router->addConfig($config, 'routes'); + Zend_Controller_Front::getInstance()->setRouter($router); + + } + +} \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/configs/application.ini b/examples/GooglePlusOAuth2/application/configs/application.ini new file mode 100644 index 0000000..10cf81c --- /dev/null +++ b/examples/GooglePlusOAuth2/application/configs/application.ini @@ -0,0 +1,35 @@ +; application/configs/application.ini + +[production] +; phpSettings +phpSettings.display_startup_errors = 0 +phpSettings.display_errors = 0 + +resources.frontController.params.displayExceptions = 0 + +includePaths.library = APPLICATION_PATH "/../library" + +; bootstrap +bootstrap.path = APPLICATION_PATH "/Bootstrap.php" +bootstrap.class = "Bootstrap" + +appnamespace = "Application" + +; controllers +resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" + +; layout +resources.layout.layoutPath = APPLICATION_PATH "/views/layouts" + +; views +resources.view[] = + +[staging : production] + +[testing : production] +phpSettings.display_startup_errors = 1 +phpSettings.display_errors = 1 + +[development : production] +phpSettings.display_startup_errors = 1 +phpSettings.display_errors = 1 \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/configs/routes.ini b/examples/GooglePlusOAuth2/application/configs/routes.ini new file mode 100644 index 0000000..d260e08 --- /dev/null +++ b/examples/GooglePlusOAuth2/application/configs/routes.ini @@ -0,0 +1,6 @@ + +; facebook callback route +routes.googlepluscallback.type = "Zend_Controller_Router_Route_Static" +routes.googlepluscallback.route = "/googlepluscallback" +routes.googlepluscallback.defaults.controller = "index" +routes.googlepluscallback.defaults.action = "googlepluscallback" \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/controllers/ErrorController.php b/examples/GooglePlusOAuth2/application/controllers/ErrorController.php new file mode 100644 index 0000000..7b6e4a6 --- /dev/null +++ b/examples/GooglePlusOAuth2/application/controllers/ErrorController.php @@ -0,0 +1,38 @@ +_getParam('error_handler'); + + switch ($errors->type) { + + case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE: + case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: + case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION: + + // 404 error -- controller or action not found + $this->getResponse()->setHttpResponseCode(404); + $this->view->message = 'Page not found'; + break; + + default: + // application error + $this->getResponse()->setHttpResponseCode(500); + $this->view->message = 'Application error'; + break; + + } + + $this->view->exception = $errors->exception; + $this->view->request = $errors->request; + $this->view->env = APPLICATION_ENV; + + } + +} \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/controllers/IndexController.php b/examples/GooglePlusOAuth2/application/controllers/IndexController.php new file mode 100644 index 0000000..63de8a5 --- /dev/null +++ b/examples/GooglePlusOAuth2/application/controllers/IndexController.php @@ -0,0 +1,149 @@ +stateSecret.md5(uniqid(rand(), TRUE)); + + $oauthSessionNamespace = new Zend_Session_Namespace('oauthSessionNamespace'); + $oauthSessionNamespace->state = $state; + + $googlePlusOAuth2ConfigurationArray = $googlePlusOAuth2Configuration->toArray(); + + $googlePlusOAuth2ConfigurationArray['state'] = $state; + + // start the google+ oauth 2 workflow + $chriswebOauth2 = new Chrisweb_Oauth2($googlePlusOAuth2ConfigurationArray); + + $chriswebOauth2->authorizationRedirect(); + + } + + /** + * google+ oauth 2 redirect_uri call + * + * If you get an error like: Unable to Connect to ssl://www.google.com:443 + * ensure open_ssl extension is enabled in your php.ini, then restart apache + */ + public function googlepluscallbackAction() + { + + $rawCode = $this->_request->getParam('code', null); + $stateParameter = $this->_request->getParam('state', null); + $errorReason = $this->_request->getParam('error_reason', null); + + $oauthSessionNamespace = new Zend_Session_Namespace('oauthSessionNamespace'); + + //Zend_Debug::dump($stateParameter, '$stateParameter'); + //Zend_Debug::dump($oauthSessionNamespace->state, '$oauthSessionNamespace->state'); + + if (is_null($stateParameter)) { + + // user refused to grant permission(s) + Zend_Debug::dump('dialog no valid state found'); + exit; + + } else if ($stateParameter !== $oauthSessionNamespace->state) { + + Zend_Debug::dump('dialog state values don\'t match'); + exit; + + } + + if (!is_null($errorReason)) { + + // user refused to grant permission(s) + Zend_Debug::dump('user refused to grant permission(s): '.$errorReason); + exit; + + } + + $filterChain = $this->getFilterChain(); + + $verificationCode = $filterChain->filter($rawCode); + + $googlePlusOAuth2Configuration = new Zend_Config_Ini(APPLICATION_PATH.'/configs/google_plus_api.ini'); + + $chriswebOauth2 = new Chrisweb_Oauth2($googlePlusOAuth2Configuration); + + $oauthResponse = null; + + try { + + /** + * if you try to exchange an expired or invalid token, google will + * reply "invalid_grant" + */ + $oauthResponse = $chriswebOauth2->requestAccessToken($verificationCode); + + } catch (Exception $e) { + + Zend_Debug::dump($e->getMessage(), 'error'); + + } + + if (is_array($oauthResponse)) { + + Zend_Debug::dump($oauthResponse, '$oauthResponse: '); + + // save OAuth Response + $oauthSessionNamespace->oauthResponse = $oauthResponse; + + } + + } + + /** + * + * @return \Zend_Filter + */ + protected function getFilterChain() { + + $filterStripTags = new Zend_Filter_StripTags(); + $filterHtmlEntities = new Zend_Filter_HtmlEntities(); + $filterStripNewLines = new Zend_Filter_StripNewLines(); + $filterStringTrim = new Zend_Filter_StringTrim(); + + $filterChain = new Zend_Filter(); + + $filterChain->addFilter($filterStripTags) + ->addFilter($filterHtmlEntities) + ->addFilter($filterStripNewLines) + ->addFilter($filterStringTrim); + + return $filterChain; + + } + +} \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/views/layouts/layout.phtml b/examples/GooglePlusOAuth2/application/views/layouts/layout.phtml new file mode 100644 index 0000000..bd5f0a7 --- /dev/null +++ b/examples/GooglePlusOAuth2/application/views/layouts/layout.phtml @@ -0,0 +1,16 @@ +doctype() ?> + + + + Zend Framework 1 Facebook Open Graph Example + + + +
+ + layout()->content ?> + +
+ + + \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/views/scripts/error/error.phtml b/examples/GooglePlusOAuth2/application/views/scripts/error/error.phtml new file mode 100644 index 0000000..124e03f --- /dev/null +++ b/examples/GooglePlusOAuth2/application/views/scripts/error/error.phtml @@ -0,0 +1,18 @@ +

An error occurred

+

message ?>

+ +env === 'development') { ?> + +

Exception information:

+

+ Message: exception->getMessage() ?> +

+ +

Stack trace:

+
exception->getTraceAsString() ?>
+    
+ +

Request Parameters:

+
request->getParams(), 1) ?>
+    
+ \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/application/views/scripts/index/googlepluscallback.phtml b/examples/GooglePlusOAuth2/application/views/scripts/index/googlepluscallback.phtml new file mode 100644 index 0000000..e69de29 diff --git a/examples/GooglePlusOAuth2/application/views/scripts/index/index.phtml b/examples/GooglePlusOAuth2/application/views/scripts/index/index.phtml new file mode 100644 index 0000000..e69de29 diff --git a/examples/GooglePlusOAuth2/public/.htaccess b/examples/GooglePlusOAuth2/public/.htaccess new file mode 100644 index 0000000..221c82c --- /dev/null +++ b/examples/GooglePlusOAuth2/public/.htaccess @@ -0,0 +1,6 @@ +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} -s [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^.*$ - [NC,L] +RewriteRule ^.*$ index.php [NC,L] \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/public/index.php b/examples/GooglePlusOAuth2/public/index.php new file mode 100644 index 0000000..0ba5ca7 --- /dev/null +++ b/examples/GooglePlusOAuth2/public/index.php @@ -0,0 +1,32 @@ +bootstrap() + ->run(); \ No newline at end of file diff --git a/examples/GooglePlusOAuth2/public/info.php b/examples/GooglePlusOAuth2/public/info.php new file mode 100644 index 0000000..f35a8ef --- /dev/null +++ b/examples/GooglePlusOAuth2/public/info.php @@ -0,0 +1,3 @@ +_request->getParam('code', null); $stateParameter = $this->_request->getParam('state', null); $errorReason = $this->_request->getParam('error_reason', null); diff --git a/library/Chrisweb/Oauth2.php b/library/Chrisweb/Oauth2.php index e696180..01e39cd 100644 --- a/library/Chrisweb/Oauth2.php +++ b/library/Chrisweb/Oauth2.php @@ -69,7 +69,7 @@ public function __construct($options = null) * if user denies url will include a parameter "error" set to "user_denied" * and an optional parameter "state" * - * - type REQUIRED (The type of user delegation authorization flow) + * - response_type REQUIRED (The type of user delegation authorization flow) * * - client_id REQUIRED (The client identifier) * @@ -100,12 +100,12 @@ public function __construct($options = null) * @param string $dialogUri * @throws Chrisweb_Oauth2_Exception */ - public function authorizationRedirect($dialogEndpoint = null, $callbackUrl = null, $clientId = null, $type = null, $state = null, $immediate = null, $requestedRights = null, $dialogUri = null) + public function authorizationRedirect($dialogEndpoint = null, $callbackUrl = null, $clientId = null, $responseType = null, $state = null, $immediate = null, $requestedRights = null, $dialogUri = null) { if (is_null($dialogEndpoint)) $dialogEndpoint = $this->_config->getDialogEndpoint(); if (is_null($callbackUrl)) $callbackUrl = $this->_config->getCallbackUrl(); if (is_null($clientId)) $clientId = $this->_config->getClientId(); - if (is_null($type)) $type = $this->_config->getType(); + if (is_null($responseType)) $responseType = $this->_config->getResponseType(); if (is_null($state)) $state = $this->_config->getState(); if (is_null($immediate)) $immediate = $this->_config->getImmediate(); if (is_null($requestedRights)) $requestedRights = $this->_config->getRequestedRights(); @@ -135,7 +135,7 @@ public function authorizationRedirect($dialogEndpoint = null, $callbackUrl = nul $requestUrl = $dialogEndpoint.$dialogUri.'?client_id='.$clientId.'&redirect_uri='.$callbackUrl; // add optional values to request url - if (!empty($scope)) $requestUrl .= '&type='.$type; + if (!empty($responseType)) $requestUrl .= '&response_type='.$responseType; if (!empty($scope)) $requestUrl .= '&scope='.$scope; if (!empty($state)) $requestUrl .= '&state='.$state; if (!empty($immediate)) $requestUrl .= '&immediate='.$immediate; @@ -279,24 +279,22 @@ public static function clearHttpClient() * @return array * @throws Chrisweb_Oauth2_Exception */ - public function requestAccessToken($verificationCode = null, $oauthEndpoint = null, $callbackUrl = null, $clientId = null, $clientSecret = null, $type = null, $secretType = null, $grantType = null, $accessTokenUri = null) + public function requestAccessToken($verificationCode = null, $oauthEndpoint = null, $callbackUrl = null, $clientId = null, $clientSecret = null, $grantType = null, $accessTokenUri = null) { if (is_null($verificationCode)) $verificationCode = $this->getVerificationCode(); if (is_null($oauthEndpoint)) $oauthEndpoint = $this->_config->getOauthEndpoint(); if (is_null($callbackUrl)) $callbackUrl = $this->_config->getCallbackUrl(); if (is_null($clientId)) $clientId = $this->_config->getClientId(); if (is_null($clientSecret)) $clientSecret = $this->_config->getClientSecret(); - if (is_null($type)) $type = $this->_config->getType(); - if (is_null($secretType)) $secretType = $this->_config->getSecretType(); if (is_null($grantType)) $grantType = $this->_config->getGrantType(); if (is_null(self::$_localHttpClient)) $this->setLocalHttpClient($this->getLocalHttpClient()); if (is_null($accessTokenUri)) $accessTokenUri = $this->_config->getAccessTokenUri(); - $requiredValuesArray = array('verificationCode', 'type', 'clientId', 'clientSecret', 'callbackUrl', 'accessTokenUri', 'oauthEndpoint'); + $requiredValuesArray = array('verificationCode', 'clientId', 'clientSecret', 'callbackUrl', 'accessTokenUri', 'oauthEndpoint'); // throw exception if one of the required values is missing foreach($requiredValuesArray as $requiredValue) { - if (is_null($requiredValue)) { + if (is_null($$requiredValue)) { require_once 'Chrisweb/Oauth2/Exception.php'; throw new Chrisweb_Oauth2_Exception('value '. $requiredValue.' is empty, pass the '.ucfirst($requiredValue).' as parameter when calling the '.__METHOD__.' method or add it to the options array you pass when creating an instance of the '.get_class($this).' class'); } @@ -310,23 +308,9 @@ public function requestAccessToken($verificationCode = null, $oauthEndpoint = nu 'code' => $verificationCode, 'redirect_uri' => $callbackUrl ); - - if (!empty($type) && !is_null($type)) { - - $postParametersArray['type'] = $type; - - } - - if (!empty($secretType) && !is_null($secretType)) { - - $postParametersArray['secret_type'] = $secretType; - - } - + if (!empty($grantType) && !is_null($grantType)) { - $postParametersArray['grant_type'] = $grantType; - } self::$_localHttpClient ->resetParameters() diff --git a/library/Chrisweb/Oauth2/Config.php b/library/Chrisweb/Oauth2/Config.php index 0e9bb2c..ce8d819 100644 --- a/library/Chrisweb/Oauth2/Config.php +++ b/library/Chrisweb/Oauth2/Config.php @@ -55,14 +55,7 @@ class Chrisweb_Oauth2_Config * * @var string */ - protected $_type = 'web_server'; - - /** - * the secret type - * - * @var string - */ - protected $_secretType = null; + protected $_responseType = 'web_server'; /** * the grant type @@ -92,7 +85,7 @@ class Chrisweb_Oauth2_Config /** * - * facebook oauth 2 dialog url + * oauth 2 dialog url * * @var string */ @@ -100,7 +93,7 @@ class Chrisweb_Oauth2_Config /** * - * facebook get the access token uri + * get the access token uri * * @var string */ @@ -149,11 +142,8 @@ public function setOptions(array $options) case 'clientSecret': $this->setClientSecret($value); break; - case 'type': - $this->setType($value); - break; - case 'secretType': - $this->setSecretType($value); + case 'responseType': + $this->setResponseType($value); break; case 'grantType': $this->setGrantType($value); @@ -290,47 +280,25 @@ public function getClientSecret() } /** - * Set type + * Set response type * * @param array rights * @return Zend_Oauth2_Config */ - public function setType($type) + public function setResponseType($responseType) { - $this->_type = $type; + $this->_responseType = $responseType; return $this; } /** - * Get type - * - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * Set secret type - * - * @param array rights - * @return Zend_Oauth2_Config - */ - public function setSecretType($secretType) - { - $this->_secretType = $secretType; - return $this; - } - - /** - * Get secret type + * Get response type * * @return string */ - public function getSecretType() + public function getResponseType() { - return $this->_secretType; + return $this->_responseType; } /** @@ -424,7 +392,7 @@ public function getRequestedRights() /** * - * Set the facebook dialog uri + * Set the dialog uri * * @param string $accessTokenUri * @return \Chrisweb_Oauth2_Config @@ -437,7 +405,7 @@ public function setDialogUri($oauthDialogUri) /** * - * Get the facebook dialog uri + * Get the dialog uri * * @return string */ @@ -448,7 +416,7 @@ public function getDialogUri() /** * - * Set the facebook access token uri + * Set the access token uri * * @param string $accessTokenUri * @return \Chrisweb_Oauth2_Config @@ -461,7 +429,7 @@ public function setAccessTokenUri($accessTokenUri) /** * - * Get the facebook access token uri + * Get the access token uri * * @return string */