UNPKG

@mvx/identity

Version:

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

35 lines (33 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FailResult = void 0; var tslib_1 = require("tslib"); var ValidationResult_1 = require("./ValidationResult"); /** * Fail authentication, with optional `challenge` and `status`, defaulting * to 401. * * Strategies should return this action to fail an authentication attempt. * * @param {String} challenge * @param {Number} status * @api public */ var FailResult = /** @class */ (function (_super) { tslib_1.__extends(FailResult, _super); function FailResult(challenge, status) { var _this = _super.call(this) || this; _this.challenge = challenge; _this.status = status; return _this; } FailResult.prototype.action = function (ctx) { ctx.failures.push({ challenge: this.challenge, status: this.status }); }; FailResultAnn = function () { return { "name": "FailResult" }; }; return FailResult; }(ValidationResult_1.ValidationResult)); exports.FailResult = FailResult; //# sourceMappingURL=../../sourcemaps/passports/results/FailResult.js.map