You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->logger->log(sprintf(static::getServiceName() . 'Setting client credentials for client "%s" using a %s bytes long secret.', $clientId, strlen($clientSecret)), LOG_INFO);
156
+
157
+
$oldOAuthToken = $this->getOAuthToken();
158
+
if ($oldOAuthToken !== null) {
159
+
$this->entityManager->remove($oldOAuthToken);
160
+
$this->entityManager->flush();
161
+
162
+
$this->logger->log(sprintf(static::getServiceName() . 'Removed old OAuth token for client "%s".', $clientId), LOG_INFO);
$this->logger->log(sprintf(static::getServiceName() . 'Persisted new OAuth token for client "%s" with expiry time %s.', $clientId, $accessToken->getExpires()), LOG_INFO);
169
+
170
+
$this->entityManager->persist($oAuthToken);
171
+
$this->entityManager->flush();
172
+
} catch (IdentityProviderException$e) {
173
+
throw$e;
174
+
}
175
+
}
176
+
142
177
/**
143
178
* Start OAuth authorization
144
179
*
@@ -202,7 +237,7 @@ public function finishAuthorization(string $code, string $state, string $scope)
$this->logger->log(sprintf(static::getServiceName() . ': Persisted new OAuth token for client "%s" with expiry time %s.', $clientId, $accessToken->getExpires()), LOG_INFO);
208
243
@@ -280,6 +315,32 @@ public function getAuthenticatedRequest(string $relativeUri, string $method = 'G
$this->logger->log(sprintf(static::getServiceName() . 'Persisted new OAuth token for client "%s" with expiry time %s.', $oAuthToken->clientId, $newAccessToken->getExpires()), LOG_INFO);
0 commit comments