mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-26 15:00:19 +05:30
Removed default overrides
This commit is contained in:
parent
e43d95415b
commit
6332ecfa0b
@ -87,17 +87,14 @@ class Server implements EmitterAwareInterface
|
|||||||
return $this->defaultResponseType;
|
return $this->defaultResponseType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
/**
|
/**
|
||||||
* Enable a grant type on the server
|
* Enable a grant type on the server
|
||||||
*
|
*
|
||||||
* @param \League\OAuth2\Server\Grant\GrantTypeInterface $grantType
|
* @param \League\OAuth2\Server\Grant\GrantTypeInterface $grantType
|
||||||
* @param ResponseTypeInterface $responseType
|
|
||||||
* @param DateInterval $accessTokenTTL
|
* @param DateInterval $accessTokenTTL
|
||||||
*/
|
*/
|
||||||
public function enableGrantType(
|
public function enableGrantType(
|
||||||
GrantTypeInterface $grantType,
|
GrantTypeInterface $grantType,
|
||||||
ResponseTypeInterface $responseType = null,
|
|
||||||
\DateInterval $accessTokenTTL
|
\DateInterval $accessTokenTTL
|
||||||
) {
|
) {
|
||||||
$grantType->setAccessTokenRepository($this->accessTokenRepository);
|
$grantType->setAccessTokenRepository($this->accessTokenRepository);
|
||||||
@ -108,18 +105,10 @@ class Server implements EmitterAwareInterface
|
|||||||
$this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType;
|
$this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType;
|
||||||
|
|
||||||
// Set grant response type
|
// Set grant response type
|
||||||
if ($responseType instanceof ResponseTypeInterface) {
|
|
||||||
$this->grantResponseTypes[$grantType->getIdentifier()] = $responseType;
|
|
||||||
} else {
|
|
||||||
$this->grantResponseTypes[$grantType->getIdentifier()] = $this->getDefaultResponseType();
|
$this->grantResponseTypes[$grantType->getIdentifier()] = $this->getDefaultResponseType();
|
||||||
}
|
|
||||||
|
|
||||||
// Set grant access token TTL
|
// Set grant access token TTL
|
||||||
if ($accessTokenTTL instanceof \DateInterval) {
|
|
||||||
$this->grantTypeAccessTokenTTL[$grantType->getIdentifier()] = $accessTokenTTL;
|
$this->grantTypeAccessTokenTTL[$grantType->getIdentifier()] = $accessTokenTTL;
|
||||||
} else {
|
|
||||||
$this->grantTypeAccessTokenTTL[$grantType->getIdentifier()] = $this->getDefaultAccessTokenTTL();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user