Skip to content

Commit

Permalink
won't invalidate JTI due to incorrect key returned
Browse files Browse the repository at this point in the history
  • Loading branch information
basz committed May 18, 2015
1 parent e3ad481 commit 0192552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/oauth2.doctrine-orm.global.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ return array(
'name' => 'audience',
'datatype' => 'string',
),
'expiration' => array(
'expires' => array(
'type' => 'field',
'name' => 'expires',
'datatype' => 'datetime',
Expand Down
6 changes: 3 additions & 3 deletions src/Adapter/DoctrineAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1233,22 +1233,22 @@ public function getJti(
$client_id,
$subject,
$audience,
$expiration,
$expires,
$jti
) {
$config = $this->getConfig();
$doctrineClientIdField = $config['mapping']['ZF\OAuth2\Doctrine\Mapper\Jti']['mapping']['client_id']['name'];
$doctrineSubjectField = $config['mapping']['ZF\OAuth2\Doctrine\Mapper\Jti']['mapping']['subject']['name'];
$doctrineAudienceField = $config['mapping']['ZF\OAuth2\Doctrine\Mapper\Jti']['mapping']['audience']['name'];
$doctrineExpirationField = $config['mapping']['ZF\OAuth2\Doctrine\Mapper\Jti']['mapping']['expiration']['name'];
$doctrineExpirationField = $config['mapping']['ZF\OAuth2\Doctrine\Mapper\Jti']['mapping']['expires']['name'];
$doctrineJtiField = $config['mapping']['ZF\OAuth2\Doctrine\Mapper\Jti']['mapping']['jti']['name'];

$mapper = $this->getServiceLocator()->get('ZF\OAuth2\Doctrine\Mapper\Jti')->reset();
$mapper->exchangeOAuth2Array(array(
'client_id' => $client_id,
'subject' => $subject,
'audience' => $audience,
'expiration' => $expiration,
'expires' => $expires,
'jti' => $jti,
));

Expand Down

0 comments on commit 0192552

Please sign in to comment.