|
@@ 143-150 (lines=8) @@
|
| 140 |
|
$this->logDebug('Handling resource owner password grant.'); |
| 141 |
|
$response = $this->passIssueToken($parameters, $determinedClient); |
| 142 |
|
break; |
| 143 |
|
case GrantTypes::CLIENT_CREDENTIALS: |
| 144 |
|
$this->logDebug('Handling client credentials grant.'); |
| 145 |
|
if ($determinedClient === null) { |
| 146 |
|
$this->logDebug('Client identification failed.'); |
| 147 |
|
throw new OAuthTokenBodyException(OAuthTokenBodyException::ERROR_INVALID_CLIENT); |
| 148 |
|
} |
| 149 |
|
$response = $this->clientIssueToken($parameters, $determinedClient); |
| 150 |
|
break; |
| 151 |
|
case GrantTypes::REFRESH_TOKEN: |
| 152 |
|
$this->logDebug('Handling refresh token grant.'); |
| 153 |
|
if ($determinedClient === null) { |
|
@@ 151-158 (lines=8) @@
|
| 148 |
|
} |
| 149 |
|
$response = $this->clientIssueToken($parameters, $determinedClient); |
| 150 |
|
break; |
| 151 |
|
case GrantTypes::REFRESH_TOKEN: |
| 152 |
|
$this->logDebug('Handling refresh token grant.'); |
| 153 |
|
if ($determinedClient === null) { |
| 154 |
|
$this->logDebug('Client identification failed.'); |
| 155 |
|
throw new OAuthTokenBodyException(OAuthTokenBodyException::ERROR_INVALID_CLIENT); |
| 156 |
|
} |
| 157 |
|
$response = $this->refreshIssueToken($parameters, $determinedClient); |
| 158 |
|
break; |
| 159 |
|
default: |
| 160 |
|
$this->logDebug('Unknown grant type.', ['grant_type' => $grantType]); |
| 161 |
|
throw new OAuthTokenBodyException(OAuthTokenBodyException::ERROR_UNSUPPORTED_GRANT_TYPE); |