Extract encryption key into the configuration param

This commit is contained in:
ErickSkrauch
2019-12-04 13:24:30 +03:00
parent 72cbf16c97
commit a9a56c9e1d
6 changed files with 18 additions and 7 deletions

View File

@@ -13,6 +13,11 @@ use yii\base\Component as BaseComponent;
class Component extends BaseComponent {
/**
* @var string|\Defuse\Crypto\Key
*/
public $encryptionKey;
/**
* @var AuthorizationServer
*/
@@ -34,7 +39,7 @@ class Component extends BaseComponent {
$accessTokensRepo,
new Repositories\EmptyScopeRepository(),
new EmptyKey(),
'123' // TODO: extract to the variable
$this->encryptionKey
);
$authCodeGrant = new AuthCodeGrant($authCodesRepo, $refreshTokensRepo, new DateInterval('PT10M'));
$authCodeGrant->disableRequireCodeChallengeForPublicClients();