Skip to content

Commit 6f81a39

Browse files
committed
Merge pull request #11 from genslein/CBStandard
updated for CB API standard format for token response
2 parents 4e70007 + 757fdb0 commit 6f81a39

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/CareerBuilder/OAuth2/Flows/Flow.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ public function getToken(AccessToken $token = null)
132132
$response = $request->send();
133133
$data = $response->json();
134134

135-
$refreshToken = isset($data['refresh_token']) ?: '';
135+
$refreshToken = isset($data['data']['refresh_token']) ?: '';
136136

137-
return new AccessToken($data['access_token'], $refreshToken, $data['expires_in']);
137+
return new AccessToken($data['data']['access_token'], $refreshToken, $data['data']['expires_in']);
138138
}
139139

140140
protected abstract function buildBody();

src/CareerBuilder/OAuth2/Flows/JWTBearerAssertion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private function getJWTBearerClaims()
5656
return array(
5757
'iss' => $this->clientId,
5858
'sub' => "{$this->email}:{$this->accountId}",
59-
'aud' => 'www.careerbuilder.com/share/oauth2'
59+
'aud' => 'www.careerbuilder.com/share/oauth2',
6060
'exp' => time() + 30
6161
);
6262
}

0 commit comments

Comments
 (0)