mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-03 18:51:53 +05:30
code against interface
This commit is contained in:
parent
890fdeba16
commit
8196f5c832
@ -13,7 +13,7 @@ use League\OAuth2\Server\Repositories\UserRepositoryInterface;
|
||||
use League\OAuth2\Server\ResponseTypes\HtmlResponse;
|
||||
use League\OAuth2\Server\ResponseTypes\RedirectResponse;
|
||||
use League\OAuth2\Server\ResponseTypes\ResponseTypeInterface;
|
||||
use League\OAuth2\Server\TemplateRenderer\AbstractRenderer;
|
||||
use League\OAuth2\Server\TemplateRenderer\RendererInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class AuthCodeGrant extends AbstractAuthorizeGrant
|
||||
@ -28,14 +28,14 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
|
||||
* @param \League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface $refreshTokenRepository
|
||||
* @param \League\OAuth2\Server\Repositories\UserRepositoryInterface $userRepository
|
||||
* @param \DateInterval $authCodeTTL
|
||||
* @param \League\OAuth2\Server\TemplateRenderer\AbstractRenderer|null $templateRenderer
|
||||
* @param \League\OAuth2\Server\TemplateRenderer\RendererInterface|null $templateRenderer
|
||||
*/
|
||||
public function __construct(
|
||||
AuthCodeRepositoryInterface $authCodeRepository,
|
||||
RefreshTokenRepositoryInterface $refreshTokenRepository,
|
||||
UserRepositoryInterface $userRepository,
|
||||
\DateInterval $authCodeTTL,
|
||||
AbstractRenderer $templateRenderer = null
|
||||
RendererInterface $templateRenderer = null
|
||||
) {
|
||||
$this->setAuthCodeRepository($authCodeRepository);
|
||||
$this->setRefreshTokenRepository($refreshTokenRepository);
|
||||
|
@ -10,16 +10,16 @@ use League\OAuth2\Server\Repositories\UserRepositoryInterface;
|
||||
use League\OAuth2\Server\ResponseTypes\HtmlResponse;
|
||||
use League\OAuth2\Server\ResponseTypes\RedirectResponse;
|
||||
use League\OAuth2\Server\ResponseTypes\ResponseTypeInterface;
|
||||
use League\OAuth2\Server\TemplateRenderer\AbstractRenderer;
|
||||
use League\OAuth2\Server\TemplateRenderer\RendererInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class ImplicitGrant extends AbstractAuthorizeGrant
|
||||
{
|
||||
/**
|
||||
* @param \League\OAuth2\Server\Repositories\UserRepositoryInterface $userRepository
|
||||
* @param \League\OAuth2\Server\TemplateRenderer\AbstractRenderer|null $templateRenderer
|
||||
* @param \League\OAuth2\Server\Repositories\UserRepositoryInterface $userRepository
|
||||
* @param \League\OAuth2\Server\TemplateRenderer\RendererInterface|null $templateRenderer
|
||||
*/
|
||||
public function __construct(UserRepositoryInterface $userRepository, AbstractRenderer $templateRenderer = null)
|
||||
public function __construct(UserRepositoryInterface $userRepository, RendererInterface $templateRenderer = null)
|
||||
{
|
||||
$this->setUserRepository($userRepository);
|
||||
$this->refreshTokenTTL = new \DateInterval('P1M');
|
||||
|
Loading…
Reference in New Issue
Block a user