Rework identity provider for the legacy OAuth2 tokens [skip ci]

This commit is contained in:
ErickSkrauch
2019-09-22 18:42:21 +03:00
parent c722c46ad5
commit cf62c686b1
10 changed files with 141 additions and 284 deletions

View File

@@ -11,9 +11,6 @@ use League\OAuth2\Server\AuthorizationServer;
use League\OAuth2\Server\Grant;
use yii\base\Component as BaseComponent;
/**
* @property AuthorizationServer $authServer
*/
class Component extends BaseComponent {
/**
@@ -39,7 +36,6 @@ class Component extends BaseComponent {
new EmptyKey(),
'123' // TODO: extract to the variable
);
/** @noinspection PhpUnhandledExceptionInspection */
$authCodeGrant = new AuthCodeGrant($authCodesRepo, $refreshTokensRepo, new DateInterval('PT10M'));
$authCodeGrant->disableRequireCodeChallengeForPublicClients();
$authServer->enableGrantType($authCodeGrant, $accessTokenTTL);