You are here

public function SalesforceAuthProviderPluginBase::refreshAccessToken in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x src/SalesforceAuthProviderPluginBase.php \Drupal\salesforce\SalesforceAuthProviderPluginBase::refreshAccessToken()

Perform a refresh of the given token.

NB: This method should also refresh any associated identity.

Parameters

\OAuth\Common\Token\TokenInterface $token: The token.

Return value

\OAuth\Common\Token\TokenInterface The refreshed token.

Throws

\OAuth\OAuth2\Service\Exception\MissingRefreshTokenException Comment.

Overrides SalesforceAuthProviderInterface::refreshAccessToken

3 methods override SalesforceAuthProviderPluginBase::refreshAccessToken()
Broken::refreshAccessToken in src/Plugin/SalesforceAuthProvider/Broken.php
Perform a refresh of the given token.
SalesforceJWTPlugin::refreshAccessToken in modules/salesforce_jwt/src/Plugin/SalesforceAuthProvider/SalesforceJWTPlugin.php
Perform a refresh of the given token.
TestSalesforceAuthProvider::refreshAccessToken in src/Tests/TestSalesforceAuthProvider.php
Perform a refresh of the given token.

File

src/SalesforceAuthProviderPluginBase.php, line 212

Class

SalesforceAuthProviderPluginBase
Shared methods for auth providers.

Namespace

Drupal\salesforce

Code

public function refreshAccessToken(TokenInterface $token) {
  $token = parent::refreshAccessToken($token);
  $this
    ->refreshIdentity($token);
  return $token;
}