@sap/xssec
Version:
XS Advanced Container Security API for node.js
13 lines (10 loc) • 543 B
JavaScript
const TokenValidationError = require("./TokenValidationError");
class UntrustedIssuerError extends TokenValidationError {
constructor(token, issuer, trustedDomains, message = `Token issuer \`${issuer}\` is not trusted because it is not a (sub)domain of the trusted domains from the service credentials: [${trustedDomains.join(", ")}].`) {
super(token, message);
this.name = "UntrustedIssuerError";
this.issuer = issuer;
this.trustedDomains = trustedDomains;
}
}
module.exports = UntrustedIssuerError;