Skip to content

Commit

Permalink
Inline variables (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored Nov 10, 2024
1 parent c19c38c commit 387aaf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/Fiken/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ protected function getTokenHeaders($code)

protected function getTokenFields($code)
{
$fields = [
'grant_type' => 'authorization_code',
return [
'code' => $code,
'grant_type' => 'authorization_code',
'redirect_uri' => $this->redirectUrl,
];

return $fields;
}

protected function getRefreshTokenResponse($refreshToken)
Expand Down
5 changes: 2 additions & 3 deletions src/LifeScienceLogin/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ protected function mapUserToObject(array $user)
private function getOpenIdConfiguration()
{
$expires = Carbon::now()->addHour();
$config = Cache::remember(self::CACHE_KEY, $expires, function () {

return Cache::remember(self::CACHE_KEY, $expires, function () {
try {
$response = $this->getHttpClient()->get(self::CONFIG_URL);
} catch (Exception $e) {
Expand All @@ -99,7 +100,5 @@ private function getOpenIdConfiguration()

return json_decode((string) $response->getBody());
});

return $config;
}
}

0 comments on commit 387aaf4

Please sign in to comment.