Skip to content

Commit fb46bae

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents c6eccd7 + dc764b7 commit fb46bae

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Authentication/Provider/GenericTokenVerifier.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private function buildUserProfileFromUserInfo(array $data): UserProfile
105105
$mappedData = $this->mapFields($data, $this->config->userFieldMapping);
106106

107107
return new UserProfile(
108-
sub: $mappedData['sub'] ?? $data['id'] ?? (string)($data['user_id'] ?? 'unknown'),
108+
sub: $mappedData['sub'] ?? $data['id'] ?? (string) ($data['user_id'] ?? 'unknown'),
109109
preferredUsername: $mappedData['preferred_username'] ?? $data['login'] ?? $data['username'] ?? null,
110110
name: $mappedData['name'] ?? $data['name'] ?? null,
111111
email: $mappedData['email'] ?? $data['email'] ?? null,
@@ -145,23 +145,23 @@ private function createAuthInfo(string $token, array $tokenData, UserProfile $us
145145
if (isset($tokenData['scope'])) {
146146
$scopes = \is_array($tokenData['scope'])
147147
? $tokenData['scope']
148-
: \explode(' ', (string)$tokenData['scope']);
148+
: \explode(' ', (string) $tokenData['scope']);
149149
} elseif (isset($tokenData['scopes'])) {
150150
$scopes = \is_array($tokenData['scopes']) ? $tokenData['scopes'] : [$tokenData['scopes']];
151151
}
152152

153153
// Extract expiration
154154
$expiresAt = $tokenData['exp'] ?? null;
155155
if ($expiresAt !== null && !\is_int($expiresAt)) {
156-
$expiresAt = (int)$expiresAt;
156+
$expiresAt = (int) $expiresAt;
157157
}
158158

159159
// Extract resource/audience
160160
$resource = $tokenData['aud'] ?? $tokenData['resource'] ?? null;
161161

162162
return new DefaultAuthInfo(
163163
token: $token,
164-
clientId: (string)$clientId,
164+
clientId: (string) $clientId,
165165
scopes: $scopes,
166166
profile: $userProfile,
167167
expiresAt: $expiresAt,

src/Authentication/Provider/ProxyClientsStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function registerClient(OAuthClientInformation $client): OAuthClientInfor
5050
throw new ServerError("Client registration failed: {$response->getStatusCode()}");
5151
}
5252

53-
$data = \json_decode((string)$response->getBody(), true);
53+
$data = \json_decode((string) $response->getBody(), true);
5454
if (\json_last_error() !== JSON_ERROR_NONE) {
5555
throw new ServerError('Invalid JSON response from registration endpoint');
5656
}

src/Authentication/Provider/TokenIntrospectionClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function introspectToken(string $token, string $introspectionUrl, ?array
4343
throw new InvalidTokenError("Token introspection failed: HTTP {$response->getStatusCode()}");
4444
}
4545

46-
$body = (string)$response->getBody();
46+
$body = (string) $response->getBody();
4747
$data = \json_decode($body, true);
4848

4949
if (\json_last_error() !== JSON_ERROR_NONE) {
@@ -79,7 +79,7 @@ public function getUserInfo(string $token, string $userinfoUrl): array
7979
throw new InvalidTokenError("User info request failed: HTTP {$response->getStatusCode()}");
8080
}
8181

82-
$body = (string)$response->getBody();
82+
$body = (string) $response->getBody();
8383
$data = \json_decode($body, true);
8484

8585
if (\json_last_error() !== JSON_ERROR_NONE) {

0 commit comments

Comments
 (0)