Skip to content

Commit

Permalink
Correctly use getCredentials when using AccessTokenLogon
Browse files Browse the repository at this point in the history
  • Loading branch information
kleiram committed May 21, 2021
1 parent 89baa79 commit f5beb65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Pronamic/Twinfield/Secure/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ protected function setOrganisationAndOffice($organisation, $office)
*/
public function getCredentials()
{
if ($this->oauthCredentials['clientToken'] != '') {
if ($this->oauth2Credentials['accessToken'] != '') {
return $this->getOAuth2Parameters();
} elseif ($this->oauthCredentials['clientToken'] != '') {
return $this->getOAuthParameters();
} else {
return $this->credentials;
Expand Down

0 comments on commit f5beb65

Please sign in to comment.