text: "use strict";
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var UnauthorizedError_1 = require("../http-error/UnauthorizedError");
  /**
   * Thrown when authorization is required thought @CurrentUser decorator.
   */
  var AuthorizationRequiredError = (function (_super) {
      __extends(AuthorizationRequiredError, _super);
      function AuthorizationRequiredError(action) {
          var _this = _super.call(this) || this;
          _this.name = "AuthorizationRequiredError";
          Object.setPrototypeOf(_this, AuthorizationRequiredError.prototype);
          var uri = action.request.method + " " + action.request.url; // todo: check it it works in koa
          _this.message = "Authorization is required for request on " + uri;
          return _this;
      }
      return AuthorizationRequiredError;
  }(UnauthorizedError_1.UnauthorizedError));
  exports.AuthorizationRequiredError = AuthorizationRequiredError;
  
  //# sourceMappingURL=AuthorizationRequiredError.js.map
  