/**
  *
  * @param string         $message
  * @param integer        $code
  * @param Exception|null $previous
  * @param string         $realmName
  */
 public function __construct($message = '', $code = 400, Exception $previous = null, $realmName = 'API')
 {
     parent::__construct($message, $code, $previous);
     $this->statusCode = $code;
     $this->errorCode = 'invalid_request';
     $this->realmName = $realmName;
 }
 /**
  *
  * @param string         $message
  * @param integer        $code
  * @param Exception|null $previous
  * @param string         $realmName
  */
 public function __construct($message = '', $code = 401, Exception $previous = null, $realmName = 'API')
 {
     if (empty($message)) {
         $message = 'The authenticated client is not authorized to use this authorization grant type.';
     }
     parent::__construct($message, $code, $previous);
     $this->statusCode = $code;
     $this->errorCode = 'unauthorized_client';
     $this->realmName = $realmName;
 }
 /**
  *
  * @param string         $message
  * @param integer        $code
  * @param Exception|null $previous
  * @param string         $realmName
  */
 public function __construct($message = '', $code = 400, Exception $previous = null, $realmName = 'API')
 {
     if (empty($message)) {
         $message = 'The authorization grant type is not supported by the authorization server.';
     }
     parent::__construct($message, $code, $previous);
     $this->statusCode = $code;
     $this->errorCode = 'unsupported_grant_type';
     $this->realmName = $realmName;
 }
 /**
  *
  * @param string         $message
  * @param integer        $code
  * @param Exception|null $previous
  * @param string         $realmName
  */
 public function __construct($message = '', $code = 400, Exception $previous = null, $realmName = 'API')
 {
     if (empty($message)) {
         $message = 'The requested scope is invalid, unknown, or malformed.';
     }
     parent::__construct($message, $code, $previous);
     $this->statusCode = $code;
     $this->errorCode = 'invalid_scope';
     $this->realmName = $realmName;
 }