Skip to content

Commit

Permalink
CS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jul 31, 2024
1 parent 20f3988 commit c706575
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions program/include/rcmail_oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ public function __construct($options = [])
'user_email' => ['email'],
'language' => ['locale'],
]),

'scope' => $this->rcmail->config->get('oauth_scope', ''),
'timeout' => $this->rcmail->config->get('oauth_timeout', 10),
'verify_peer' => $this->rcmail->config->get('oauth_verify_peer', true),
Expand Down Expand Up @@ -209,10 +208,12 @@ protected function discover(): void
if (empty($config_uri)) {
return;
}

$key_cache = 'discovery.' . md5($config_uri);

try {
$data = $this->cache ? $this->cache->get($key_cache) : null;

if ($data === null) {
// Caveat: if .well-known URL is not answering it will break login display (will not display the button)
$response = $this->http_client->get($config_uri);
Expand Down Expand Up @@ -392,8 +393,6 @@ protected static function base64url_encode($payload)
*/
public function jwt_decode($jwt)
{
$body = [];

[$headb64, $bodyb64, $cryptob64] = explode('.', $jwt);

$header = json_decode(static::base64url_decode($headb64), true);
Expand Down

0 comments on commit c706575

Please sign in to comment.