Skip to content

Commit

Permalink
fix(local_o365): check secret property
Browse files Browse the repository at this point in the history
  • Loading branch information
João Pedro Barboza Garcia - JGA committed Dec 4, 2023
1 parent acd71a8 commit be96d22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion local/o365/classes/oauth2/clientdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ public static function instance_from_oidc($tenant = null) {
if (!empty($tenant)) {
$apptokenendpoint = static::get_apptokenendpoint_from_tenant($tenant);
}
return new static($cfg->clientid, $cfg->clientsecret, $cfg->authendpoint, $cfg->tokenendpoint, $apptokenendpoint);
$clientsecret = null;
if (property_exists($cfg, 'clientsecret')) {
$clientsecret = $cfg->clientsecret;
}

return new static($cfg->clientid, $clientsecret, $cfg->authendpoint, $cfg->tokenendpoint, $apptokenendpoint);
}

/**
Expand Down

0 comments on commit be96d22

Please sign in to comment.