mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
Add whitespace around control blocks
This commit is contained in:
parent
9236e842d9
commit
86869eafbb
@ -477,6 +477,7 @@ abstract class AbstractGrant implements GrantTypeInterface
|
||||
protected function issueRefreshToken(AccessTokenEntityInterface $accessToken)
|
||||
{
|
||||
$refreshToken = $this->refreshTokenRepository->getNewRefreshToken();
|
||||
|
||||
if ($refreshToken === null) {
|
||||
return null;
|
||||
}
|
||||
@ -485,6 +486,7 @@ abstract class AbstractGrant implements GrantTypeInterface
|
||||
$refreshToken->setAccessToken($accessToken);
|
||||
|
||||
$maxGenerationAttempts = self::MAX_RANDOM_TOKEN_GENERATION_ATTEMPTS;
|
||||
|
||||
while ($maxGenerationAttempts-- > 0) {
|
||||
$refreshToken->setIdentifier($this->generateUniqueIdentifier());
|
||||
try {
|
||||
|
@ -152,6 +152,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
|
||||
|
||||
// Issue and persist new refresh token if given
|
||||
$refreshToken = $this->issueRefreshToken($accessToken);
|
||||
|
||||
if ($refreshToken !== null) {
|
||||
$this->getEmitter()->emit(new RequestEvent(RequestEvent::REFRESH_TOKEN_ISSUED, $request));
|
||||
$responseType->setRefreshToken($refreshToken);
|
||||
|
@ -63,6 +63,7 @@ class PasswordGrant extends AbstractGrant
|
||||
|
||||
// Issue and persist new refresh token if given
|
||||
$refreshToken = $this->issueRefreshToken($accessToken);
|
||||
|
||||
if ($refreshToken !== null) {
|
||||
$this->getEmitter()->emit(new RequestEvent(RequestEvent::REFRESH_TOKEN_ISSUED, $request));
|
||||
$responseType->setRefreshToken($refreshToken);
|
||||
|
@ -70,6 +70,7 @@ class RefreshTokenGrant extends AbstractGrant
|
||||
|
||||
// Issue and persist new refresh token if given
|
||||
$refreshToken = $this->issueRefreshToken($accessToken);
|
||||
|
||||
if ($refreshToken !== null) {
|
||||
$this->getEmitter()->emit(new RequestEvent(RequestEvent::REFRESH_TOKEN_ISSUED, $request));
|
||||
$responseType->setRefreshToken($refreshToken);
|
||||
|
Loading…
Reference in New Issue
Block a user