moleculer-iam
Version:
Centralized IAM module for moleculer. Including a certified OIDC provider and an Identity provider for user profile, credentials, and custom claims management. Custom claims could be defined/updated by declarative schema which contains claims validation a
46 lines • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IAMErrors = void 0;
class IdentityProviderError {
constructor(status, error, error_description) {
this.status = status;
this.error = error;
this.error_description = error_description;
}
}
class IdentityAlreadyExists extends IdentityProviderError {
constructor() {
super(400, "IdentityAlreadyExists", "The account already exists.");
}
}
class IdentityNotExists extends IdentityProviderError {
constructor() {
super(400, "IdentityNotExists", "The account does not exists.");
}
}
class InvalidCredentials extends IdentityProviderError {
constructor() {
super(400, "InvalidCredentials", "Invalid credentials.");
}
}
class UnsupportedCredentials extends IdentityProviderError {
constructor() {
super(400, "UnsupportedCredentials", "Cannot use the given type of credentials.");
}
}
class ValidationFailed extends IdentityProviderError {
constructor(data, debug) {
super(422, "ValidationFailed", "Failed to validate given payload.");
this.data = data;
this.debug = debug;
}
}
exports.IAMErrors = {
IdentityProviderError,
IdentityAlreadyExists,
IdentityNotExists,
InvalidCredentials,
UnsupportedCredentials,
ValidationFailed,
};
//# sourceMappingURL=error.js.map