From ba37ec143ab0cebeec9939cee86028c7dba28171 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Tue, 10 Dec 2024 22:17:48 -0600 Subject: [PATCH] docs: change variable name for clarity in usage docs Resolves #1017 Co-authored-by: Murray Collingwood --- docs/usage.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index fba6aa16..73cbc4dd 100755 --- a/docs/usage.md +++ b/docs/usage.md @@ -67,16 +67,16 @@ if (!isset($_GET['code'])) { $provider->setPkceCode($_SESSION['oauth2pkceCode']); // Try to get an access token using the authorization code grant. - $accessToken = $provider->getAccessToken('authorization_code', [ + $tokens = $provider->getAccessToken('authorization_code', [ 'code' => $_GET['code'] ]); // We have an access token, which we may use in authenticated // requests against the service provider's API. - echo 'Access Token: ' . $accessToken->getToken() . "
"; - echo 'Refresh Token: ' . $accessToken->getRefreshToken() . "
"; - echo 'Expired in: ' . $accessToken->getExpires() . "
"; - echo 'Already expired? ' . ($accessToken->hasExpired() ? 'expired' : 'not expired') . "
"; + echo 'Access Token: ' . $tokens->getToken() . "
"; + echo 'Refresh Token: ' . $tokens->getRefreshToken() . "
"; + echo 'Expired in: ' . $tokens->getExpires() . "
"; + echo 'Already expired? ' . ($tokens->hasExpired() ? 'expired' : 'not expired') . "
"; // Using the access token, we may look up details about the // resource owner.