Beispiel #1
0
 /**
  * {@inheritDoc}
  */
 protected function failedAuthorization()
 {
     if (is_api_request()) {
         return app(Response::class)->unauthorizedError();
     }
     return parent::failedAuthorization();
 }
Beispiel #2
0
 /**
  * Handle a failed authorization attempt.
  *
  * @return void
  */
 protected function failedAuthorization()
 {
     if ($this->container['request'] instanceof Request) {
         throw new HttpException(403);
     }
     parent::failedAuthorization();
 }
 protected function failedAuthorization()
 {
     parent::failedAuthorization();
 }