@@ -91,9 +91,9 @@ |
||
91 | 91 | */ |
92 | 92 | public function authenticationResponseAction(Account $account) |
93 | 93 | { |
94 | - if( $this->client->callHubic($account) ){ |
|
94 | + if ($this->client->callHubic($account)) { |
|
95 | 95 | $this->addFlashMessage('Token successfully added', 'Authentication request', \TYPO3\CMS\Core\Messaging\AbstractMessage::OK); |
96 | - }else { |
|
96 | + } else { |
|
97 | 97 | $this->addFlashMessage('Failed getting token please check client ID and client secret', 'Authentication request', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
98 | 98 | } |
99 | 99 | $this->redirect('show', '', '', ['account' => $account]); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | use TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject; |
19 | 19 | |
20 | -class Account extends AbstractDomainObject { |
|
20 | +class Account extends AbstractDomainObject { |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @var string |
@@ -74,13 +74,13 @@ |
||
74 | 74 | $params = array('code' => $code, 'redirect_uri' => $this->getRedirectUri($this->account)); |
75 | 75 | $response = $this->OAuth->getAccessToken(self::TOKEN_ENDPOINT, 'authorization_code', $params); |
76 | 76 | |
77 | - if( $response ){ |
|
78 | - if( $response['code'] == 200 ){ |
|
77 | + if ($response) { |
|
78 | + if ($response['code'] == 200) { |
|
79 | 79 | $this->account->setAccessToken($response['result']['access_token']); |
80 | 80 | $this->persistenceManager->update($this->account); |
81 | 81 | $this->persistenceManager->persistAll(); |
82 | 82 | return true; |
83 | - }else { |
|
83 | + } else { |
|
84 | 84 | return false; |
85 | 85 | } |
86 | 86 | } else { |