Skip to content

Commit

Permalink
Merge pull request #477 from Lavoaster/patch-1
Browse files Browse the repository at this point in the history
Fix resource_owner_id being put into the wrong array
ramsey committed Jan 5, 2016
2 parents 7bd1ecf + d94b2a9 commit c68f4ed
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Token/AccessToken.php
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ public function jsonSerialize()
}

if ($this->resourceOwnerId) {
$params['resource_owner_id'] = $this->resourceOwnerId;
$parameters['resource_owner_id'] = $this->resourceOwnerId;
}

return $parameters;
3 changes: 2 additions & 1 deletion test/src/Token/AccessTokenTest.php
Original file line number Diff line number Diff line change
@@ -101,12 +101,13 @@ public function testCannotReportExpiredWhenNoExpirationSet()
$hasExpired = $token->hasExpired();
}

public function testJsonSerialzable()
public function testJsonSerializable()
{
$options = [
'access_token' => 'mock_access_token',
'refresh_token' => 'mock_refresh_token',
'expires' => time(),
'resource_owner_id' => 'mock_resource_owner_id',
];

$token = $this->getAccessToken($options);

0 comments on commit c68f4ed

Please sign in to comment.