| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Oauth2ServerException extends OAuthServerException implements Oauth2ServerExceptionInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Authorization not allowed. |
||
| 12 | * @param null|string $redirectUri A HTTP URI to redirect the user back to |
||
| 13 | * @return static |
||
| 14 | * @since 1.0.0 |
||
| 15 | */ |
||
| 16 | public static function authorizationNotAllowed($redirectUri = null) |
||
| 17 | { |
||
| 18 | $errorMessage = 'Authorization not allowed.'; |
||
| 19 | $hint = 'The user is not is not allowed to authorize the specified client.'; |
||
| 20 | |||
| 21 | return new static($errorMessage, 0, 'authorization_not_allowed', 403, $hint, $redirectUri); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Invalid scope error. |
||
| 26 | * |
||
| 27 | * @param string $scope The bad scope |
||
| 28 | * @param null|string $redirectUri A HTTP URI to redirect the user back to |
||
| 29 | * |
||
| 30 | * @return static |
||
| 31 | */ |
||
| 32 | public static function scopeNotAllowedForClient($scope, $redirectUri = null) |
||
| 42 | } |
||
| 43 | } |
||
| 44 |