We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Restify v5.x all errors definitions were moved into the separate repository: restify-errors.
As a result, restify-oauth2 code requires refactoring as described here: http://restify.com/docs/home/#restify-errors
The text was updated successfully, but these errors were encountered:
For example, the makeOAuthError.js file should be changed to the following.
"use strict"; var errors = require("restify-errors"); module.exports = function makeOAuthError(errorClass, errorType, errorDescription) { var body = { error: errorType, error_description: errorDescription }; return new errors[errorClass + "Error"]({ message: errorDescription, body: body }); };
Moreover, the error response for the secret route in server.js should be the following
if (!req.username) { return res.send(new errors.UnauthorizedError("No allowed.")); //not return res.sendUnauthenticated(); }
PS. you need to import the "restify-errors" at the beginning of the file
Sorry, something went wrong.
No branches or pull requests
In Restify v5.x all errors definitions were moved into the separate repository: restify-errors.
As a result, restify-oauth2 code requires refactoring as described here: http://restify.com/docs/home/#restify-errors
The text was updated successfully, but these errors were encountered: