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($this->getServiceType() . 'Setting client credentials for client "%s" using a %s bytes long secret.', $clientId, strlen($clientSecret)), LOG_INFO);
208
+
$this->logger->info(sprintf('OAuth (%s): Retrieving client credentials for client "%s" using a %s bytes long secret.', $this->getServiceType(), $clientId, strlen($clientSecret)), LogEnvironment::fromMethodName(__METHOD__));
$this->logger->log(sprintf($this->getServiceType() . 'Persisted new OAuth authorization %s for client "%s" with expiry time %s.', $authorizationId, $clientId, $accessToken->getExpires()), LOG_INFO);
221
+
$this->logger->info(sprintf('OAuth (%s): Persisted new OAuth authorization %s for client "%s" with expiry time %s.', $this->getServiceType(), $authorizationId, $clientId, $accessToken->getExpires()), LogEnvironment::fromMethodName(__METHOD__));
220
222
221
223
$this->entityManager->persist($authorization);
222
224
$this->entityManager->flush();
@@ -226,7 +228,7 @@ public function addClientCredentials(string $clientId, string $clientSecret, str
226
228
}
227
229
228
230
/**
229
-
* Start OAuth authorization
231
+
* Start OAuth authorization with the Authorization Code Flow
230
232
*
231
233
* @param string $clientId The client id, as provided by the OAuth server
232
234
* @param string $clientSecret The client secret, provided by the OAuth server
@@ -251,10 +253,10 @@ public function startAuthorization(string $clientId, string $clientSecret, Uri $
251
253
]
252
254
);
253
255
} catch (Exception$exception) {
254
-
thrownewOAuthClientException(sprintf('Failed setting cache entry for OAuth2 authorization: %s', $exception->getMessage()), 1560178858);
256
+
thrownewOAuthClientException(sprintf('Failed setting cache entry for OAuth authorization: %s', $exception->getMessage()), 1560178858);
255
257
}
256
258
257
-
$this->logger->log(sprintf('Flownative OAuth2 Client (%s): Starting authorization %s using client id "%s" and a %s bytes long secret, returning to "%s".', $this->getServiceType(), $stateIdentifier, $clientId, strlen($clientSecret), $returnToUri), LOG_INFO);
259
+
$this->logger->info(sprintf('OAuth (%s): Starting authorization %s using client id "%s" and a %s bytes long secret, returning to "%s".', $this->getServiceType(), $stateIdentifier, $clientId, strlen($clientSecret), $returnToUri), LogEnvironment::fromMethodName(__METHOD__));
258
260
return$authorizationUri;
259
261
}
260
262
@@ -274,27 +276,27 @@ public function finishAuthorization(string $code, string $stateIdentifier, strin
thrownewOAuthClientException(sprintf('Flownative OAuth2 Client: Finishing authorization failed because oAuth state %s could not be retrieved from the state cache.', $stateIdentifier), 1558956494);
279
+
thrownewOAuthClientException(sprintf('OAuth2: Finishing authorization failed because oAuth state %s could not be retrieved from the state cache.', $stateIdentifier), 1558956494);
$this->logger->log(sprintf('Flownative OAuth2 Client (%s): Finishing authorization for client "%s", state "%s", using a %s bytes long secret.', $this->getServiceType(), $clientId, $stateIdentifier, strlen($clientSecret)), LOG_INFO);
287
+
$this->logger->info(sprintf('OAuth (%s): Finishing authorization for client "%s", state "%s", using a %s bytes long secret.', $this->getServiceType(), $clientId, $stateIdentifier, strlen($clientSecret)), LogEnvironment::fromMethodName(__METHOD__));
$this->logger->log(sprintf('Flownative OAuth2 Client: Persisted new OAuth token for authorization "%s" with expiry time %s.', $stateIdentifier, $accessToken->getExpires()), LOG_INFO);
299
+
$this->logger->info(sprintf('OAuth (%s): Persisted new OAuth token for authorization "%s" with expiry time %s.', $this->getServiceType(), $stateIdentifier, $accessToken->getExpires()), LogEnvironment::fromMethodName(__METHOD__));
298
300
299
301
$this->entityManager->persist($authorization);
300
302
$this->entityManager->flush();
@@ -322,18 +324,18 @@ public function refreshAuthorization(string $authorizationId, string $clientId,
thrownewOAuthClientException(sprintf('Flownative OAuth2 Client: Could not refresh OAuth2 token because authorization %s was not found in our database.', $authorization), 1505317044316);
327
+
thrownewOAuthClientException(sprintf('OAuth2: Could not refresh OAuth token because authorization %s was not found in our database.', $authorization), 1505317044316);
$this->logger->log(sprintf($this->getServiceType() . ': Refreshing authorization %s for client "%s" using a %s bytes long secret and refresh token "%s".', $authorizationId, $clientId, strlen($authorization->clientSecret), $authorization->refreshToken), LOG_INFO);
331
+
$this->logger->info(sprintf('OAuth (%s): Refreshing authorization %s for client "%s" using a %s bytes long secret and refresh token "%s".', $this->getServiceType(), $authorizationId, $clientId, strlen($authorization->clientSecret), $authorization->refreshToken), LogEnvironment::fromMethodName(__METHOD__));
$this->logger->log(sprintf($this->getServiceType() . ': New access token is "%s", refresh token is "%s".', $authorization->accessToken, $authorization->refreshToken), LOG_DEBUG);
338
+
$this->logger->debug(sprintf($this->getServiceType() . ': New access token is "%s", refresh token is "%s".', $authorization->accessToken, $authorization->refreshToken), LogEnvironment::fromMethodName(__METHOD__));
337
339
338
340
$this->entityManager->persist($authorization);
339
341
$this->entityManager->flush();
@@ -389,14 +391,14 @@ public function getAuthenticatedRequest(string $relativeUri, string $method = 'G
$this->logger->log(sprintf($this->getServiceType() . 'Persisted new OAuth token for client "%s" with expiry time %s.', $oAuthToken->clientId, $newAccessToken->getExpires()), LOG_INFO);
401
+
$this->logger->info(sprintf('OAuth (%s): Persisted new OAuth token for client "%s" with expiry time %s.', $this->getServiceType(), $oAuthToken->clientId, $newAccessToken->getExpires()), LogEnvironment::fromMethodName(__METHOD__));
0 commit comments