UNPKG

@mvx/identity

Version:

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

31 lines (29 loc) 879 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FailResult = void 0; const 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 */ class FailResult extends ValidationResult_1.ValidationResult { constructor(challenge, status) { super(); this.challenge = challenge; this.status = status; } action(ctx) { ctx.failures.push({ challenge: this.challenge, status: this.status }); } static ρAnn() { return { "name": "FailResult" }; } } exports.FailResult = FailResult; //# sourceMappingURL=../../sourcemaps/passports/results/FailResult.js.map