refactor: use english for routes, parameters and internal messages
This commit is contained in:
1 parent
bce8f58be3
commit
a88ff7ff24
22 files changed
+106
-135
No files matched your search
@@ -74,11 +74,11 @@ class EpClient
|
||||
|
||||
$code = $request->query->get('code');
|
||||
if (null === $code || '' === $code) {
|
||||
throw new AuthorizationRequestException('Die Antwort von myep enthielt keinen Code.');
|
||||
throw new AuthorizationRequestException('The callback from myep carried no authorization code.');
|
||||
}
|
||||
|
||||
if (null === $expectedState || $request->query->get('state') !== $expectedState) {
|
||||
throw new AuthorizationRequestException('Der state-Parameter passt nicht zur Sitzung.');
|
||||
throw new AuthorizationRequestException('The state parameter does not match the one this session started with.');
|
||||
}
|
||||
|
||||
return $this->getProvider()->getAccessToken('authorization_code', ['code' => $code]);
|
||||
@@ -107,13 +107,13 @@ class EpClient
|
||||
['headers' => ['Accept' => 'application/json']],
|
||||
));
|
||||
} catch (ClientExceptionInterface $e) {
|
||||
throw new UserinfoUnavailableException('userinfo konnte nicht abgerufen werden.', previous: $e);
|
||||
throw new UserinfoUnavailableException('The userinfo endpoint could not be reached.', previous: $e);
|
||||
}
|
||||
|
||||
$userinfo = json_decode((string) $response->getBody(), true);
|
||||
|
||||
if (!\is_array($userinfo)) {
|
||||
throw new UserinfoUnavailableException('userinfo lieferte keine lesbare Antwort.');
|
||||
throw new UserinfoUnavailableException('The userinfo endpoint returned an unreadable payload.');
|
||||
}
|
||||
|
||||
return $userinfo;
|
||||
|
||||
Reference in new issue
Block a user