mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Inject required params into grant type
This commit is contained in:
@ -77,7 +77,11 @@ class Server implements EmitterAwareInterface
|
|||||||
protected function getDefaultResponseType()
|
protected function getDefaultResponseType()
|
||||||
{
|
{
|
||||||
if (!$this->defaultResponseType instanceof ResponseTypeInterface) {
|
if (!$this->defaultResponseType instanceof ResponseTypeInterface) {
|
||||||
$this->defaultResponseType = new BearerTokenResponse($this->defaultPrivateKeyPath);
|
$this->defaultResponseType = new BearerTokenResponse(
|
||||||
|
$this->defaultPrivateKeyPath,
|
||||||
|
$this->defaultPublicKeyPath,
|
||||||
|
$this->accessTokenRepository
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->defaultResponseType;
|
return $this->defaultResponseType;
|
||||||
@ -96,6 +100,10 @@ class Server implements EmitterAwareInterface
|
|||||||
ResponseTypeInterface $responseType = null,
|
ResponseTypeInterface $responseType = null,
|
||||||
\DateInterval $accessTokenTTL
|
\DateInterval $accessTokenTTL
|
||||||
) {
|
) {
|
||||||
|
$grantType->setAccessTokenRepository($this->accessTokenRepository);
|
||||||
|
$grantType->setClientRepository($this->clientRepository);
|
||||||
|
$grantType->setScopeRepository($this->scopeRepository);
|
||||||
|
|
||||||
$grantType->setEmitter($this->getEmitter());
|
$grantType->setEmitter($this->getEmitter());
|
||||||
$this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType;
|
$this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user