@wristband/express-auth
Version:
SDK for integrating your ExpressJS application with Wristband. Handles user authentication and token management.
26 lines (25 loc) • 765 B
JavaScript
;
/* eslint-disable max-classes-per-file */
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidGrantError = exports.WristbandError = void 0;
class WristbandError extends Error {
constructor(error, errorDescription) {
super(error);
this.name = 'WristbandError';
this.error = error;
this.errorDescription = errorDescription;
}
getError() {
return this.error;
}
getErrorDescription() {
return this.errorDescription;
}
}
exports.WristbandError = WristbandError;
class InvalidGrantError extends WristbandError {
constructor(errorDescription) {
super('invalid_grant', errorDescription || '');
}
}
exports.InvalidGrantError = InvalidGrantError;