@sap/xssec
Version:
XS Advanced Container Security API for node.js
19 lines (15 loc) • 574 B
JavaScript
const TokenValidationError = require("./TokenValidationError");
class X5tError extends TokenValidationError {
/** @type {String} client certificate used for x5t validation */
clientCertificate;
constructor(token, clientCertificate, message = "X5t validation of token failed.") {
super(token, message);
this.name = "X5tError";
this.clientCertificate = clientCertificate;
}
/** For backward-compatibility because property was renamed. */
get cert() {
return this.clientCertificate;
}
}
module.exports = X5tError;