fixed so the code compiles
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* `TokenError` error.
|
||||
*
|
||||
* TokenError represents an error received from a token endpoint. For details,
|
||||
* refer to RFC 6749, section 5.2.
|
||||
*
|
||||
* References:
|
||||
* - [The OAuth 2.0 Authorization Framework](http://tools.ietf.org/html/rfc6749)
|
||||
*
|
||||
* @constructor
|
||||
* @param {String} [message]
|
||||
* @param {String} [code]
|
||||
* @param {String} [uri]
|
||||
* @param {Number} [status]
|
||||
* @api public
|
||||
*/
|
||||
function TokenError(message, code, uri, status) {
|
||||
Error.call(this);
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
this.name = this.constructor.name;
|
||||
this.message = message;
|
||||
this.code = code || 'invalid_request';
|
||||
this.uri = uri;
|
||||
this.status = status || 500;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inherit from `Error`.
|
||||
*/
|
||||
TokenError.prototype.__proto__ = Error.prototype;
|
||||
|
||||
|
||||
/**
|
||||
* Expose `TokenError`.
|
||||
*/
|
||||
module.exports = TokenError;
|
||||
Reference in New Issue
Block a user