UNPKG

@mvx/identity

Version:

identity is oidc for mvc, type-mvc is base on koa. Decorator, Ioc, AOP mvc framework on server.

43 lines (41 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OIDCError = void 0; var tslib_1 = require("tslib"); var AuthenticationError_1 = require("./AuthenticationError"); /** * error. * * @export * @class OIDCError * @extends {HttpError} */ var OIDCError = /** @class */ (function (_super) { tslib_1.__extends(OIDCError, _super); function OIDCError(message, code, uri, status) { var _this = _super.call(this, status, message) || this; _this.code = code; _this.uri = uri; if (!status) { switch (code) { case 'access_denied': status = 403; break; case 'server_error': status = 502; break; case 'temporarily_unavailable': status = 503; break; } } _this.expose = status < 500; return _this; } OIDCErrorAnn = function () { return { "name": "OIDCError" }; }; return OIDCError; }(AuthenticationError_1.AuthenticationError)); exports.OIDCError = OIDCError; //# sourceMappingURL=../sourcemaps/errors/OIDCError.js.map