Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit dfdd3d7

Browse files
committed
:octocat: OAuthInterface::getAccessTokenFromStorage()
1 parent 5768dc3 commit dfdd3d7

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

examples/get-token/LastFM.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
elseif(isset($_GET['granted']) && $_GET['granted'] === $name){
4141
echo '<pre>'.print_r(MessageUtil::decodeJSON($provider->me()), true).'</pre>'.
4242
'<textarea cols="120" rows="3" onclick="this.select();">'.
43-
$provider->getStorage()->getAccessToken($name)->toJSON().
43+
$provider->getAccessTokenFromStorage()->toJSON().
4444
'</textarea>';
4545
}
4646
// step 1 (optional): display a login link

examples/get-token/MailChimp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
elseif(isset($_GET['granted']) && $_GET['granted'] === $name){
4747
echo '<pre>'.print_r(MessageUtil::decodeJSON($provider->me()), true).'</pre>'.
4848
'<textarea cols="120" rows="3" onclick="this.select();">'.
49-
$provider->getStorage()->getAccessToken($name)->toJSON().
49+
$provider->getAccessTokenFromStorage()->toJSON().
5050
'</textarea>';
5151
}
5252
// step 1 (optional): display a login link

examples/get-token/MusicBrainz.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
echo '<pre>'.print_r(MessageUtil::decodeJSON($response), true).'</pre>'.
4545
'<textarea cols="120" rows="3" onclick="this.select();">'.
46-
$provider->getStorage()->getAccessToken($name)->toJSON().
46+
$provider->getAccessTokenFromStorage()->toJSON().
4747
'</textarea>';
4848
}
4949
// step 1 (optional): display a login link

examples/get-token/SteamOpenID.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
// step 4: verify the token and use the API
4040
elseif(isset($_GET['granted']) && $_GET['granted'] === $name){
41-
$token = $provider->getStorage()->getAccessToken($name); // the user's steamid is stored as access token
41+
$token = $provider->getAccessTokenFromStorage(); // the user's steamid is stored as access token
4242
$response = $provider->request('/ISteamUser/GetPlayerSummaries/v2', ['steamids' => $token->accessToken]);
4343

4444
echo '<pre>'.print_r(MessageUtil::decodeJSON($response), true).'</pre>'.

examples/get-token/_flow-oauth1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
elseif(isset($_GET['granted']) && $_GET['granted'] === $name){
3535
echo '<pre>'.print_r(MessageUtil::decodeJSON($provider->me()), true).'</pre>'.
3636
'<textarea cols="120" rows="3" onclick="this.select();">'.
37-
$provider->getStorage()->getAccessToken($name)->toJSON().
37+
$provider->getAccessTokenFromStorage()->toJSON().
3838
'</textarea>';
3939
}
4040
// step 1 (optional): display a login link

examples/get-token/_flow-oauth2-no-state.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
elseif(isset($_GET['granted']) && $_GET['granted'] === $name){
3636
echo '<pre>'.print_r(MessageUtil::decodeJSON($provider->me()), true).'</pre>'.
3737
'<textarea cols="120" rows="3" onclick="this.select();">'.
38-
$provider->getStorage()->getAccessToken($name)->toJSON().
38+
$provider->getAccessTokenFromStorage()->toJSON().
3939
'</textarea>';
4040
}
4141
// step 1 (optional): display a login link

examples/get-token/_flow-oauth2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
elseif(isset($_GET['granted']) && $_GET['granted'] === $name){
3636
echo '<pre>'.print_r(MessageUtil::decodeJSON($provider->me()), true).'</pre>'.
3737
'<textarea cols="120" rows="3" onclick="this.select();">'.
38-
$provider->getStorage()->getAccessToken($name)->toJSON().
38+
$provider->getAccessTokenFromStorage()->toJSON().
3939
'</textarea>';
4040
}
4141
// step 1 (optional): display a login link

src/Core/OAuthInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function storeAccessToken(AccessToken $token):static;
9494
/**
9595
* Gets an access token from the current OAuthStorageInterface (shorthand/convenience)
9696
*/
97-
public function retrieveAccessToken():AccessToken;
97+
public function getAccessTokenFromStorage():AccessToken;
9898

9999
/**
100100
* Sets an optional PSR-3 LoggerInterface

src/Core/OAuthProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function storeAccessToken(AccessToken $token):static{
192192
* @inheritDoc
193193
* @codeCoverageIgnore
194194
*/
195-
public function retrieveAccessToken():AccessToken{
195+
public function getAccessTokenFromStorage():AccessToken{
196196
return $this->storage->getAccessToken($this->serviceName);
197197
}
198198

0 commit comments

Comments
 (0)