Skip to content

Commit bd4aff9

Browse files
committed
remove overwrite of the refresh token
1 parent b8a9142 commit bd4aff9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/TokenGenerator.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ public function generateAccessToken($clientId, $subject) {
7878
}
7979

8080
public function bindDpop($dpop, $accessToken) {
81-
$jkt = $this->makeJwkThumbprint($dpop);
82-
$accessToken['payload']['cnf'] = [
83-
'jkt' => $jkt
84-
];
81+
if ($dpop) {
82+
$jkt = $this->makeJwkThumbprint($dpop);
83+
$accessToken['payload']['cnf'] = [
84+
'jkt' => $jkt
85+
];
86+
}
8587
return $accessToken;
8688
}
8789

@@ -197,7 +199,7 @@ public function addIdTokenToResponse($response, $clientId, $subject, $nonce, $pr
197199

198200
$body['access_token'] = $accessToken;
199201
$body['id_token'] = $idToken;
200-
$body['refresh_token'] = str_repeat('a', 209); // FIXME: Remove this, DO NOT MERGE. Podpro doesn't like refresh tokens longer than 209 characters;
202+
// $body['refresh_token'] = str_repeat('a', 209); // FIXME: Remove this, DO NOT MERGE. Podpro doesn't like refresh tokens longer than 209 characters;
201203

202204
return new JsonResponse($body);
203205
} catch (\Exception $e) {

0 commit comments

Comments
 (0)