Skip to content

Commit 855f884

Browse files
committed
Use JWT bearer tokens
1 parent e1aab72 commit 855f884

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Atomx/AtomxClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function getDefaultOptions()
5757
$options = parent::getDefaultOptions();
5858

5959
if ($this->shouldSendToken)
60-
$options['cookies'] = ['auth_tkt' => $this->getToken()];
60+
$options['headers'] = ['Authorization' => $this->getToken()];
6161

6262
return $options;
6363
}
@@ -84,7 +84,8 @@ public function login()
8484
if ($response['success'] !== true)
8585
throw new ApiException('Unable to login to API!');
8686

87-
$token = $response['auth_tkt'] . '!userid_type:int';
87+
88+
$token = 'Bearer ' . $response['auth_token'];
8889

8990
$this->accountStore->storeToken($token);
9091

0 commit comments

Comments
 (0)