Skip to content

Commit

Permalink
Merge pull request #6 from chx/patch-1
Browse files Browse the repository at this point in the history
Introduce config constants
  • Loading branch information
dm committed Sep 17, 2016
2 parents f890841 + bc2dee3 commit 979e61e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/GrantType/AuthorizationCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@ class AuthorizationCode extends GrantTypeBase
{
protected $grantType = 'authorization_code';

const CONFIG_REDIRECT_URI = 'redirect_uri';
const CONFIG_CODE = 'code';

/**
* {@inheritdoc}
*/
protected function getDefaults()
{
return array_merge(parent::getDefaults(), ['redirect_uri' => '']);
return array_merge(parent::getDefaults(), [self::CONFIG_REDIRECT_URI => '']);
}

/**
* {@inheritdoc}
*/
protected function getRequired()
{
return array_merge(parent::getRequired(), ['code' => '']);
return array_merge(parent::getRequired(), [self::CONFIG_CODE => '']);
}
}

0 comments on commit 979e61e

Please sign in to comment.