oauth2orize
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -132,3 +132,4 @@ /** | ||
req.oauth2.user = req[userProperty]; | ||
if (req.locals) { req.oauth2.locals = req.locals; } | ||
if (err) { return next(err); } | ||
@@ -142,3 +143,6 @@ if (!client) { return next(new AuthorizationError('Unauthorized client', 'unauthorized_client')); } | ||
req.oauth2.res.allow = true; | ||
req.oauth2.locals = locals; | ||
if (locals) { | ||
req.oauth2.locals = req.oauth2.locals || {}; | ||
utils.merge(req.oauth2.locals, locals); | ||
} | ||
@@ -165,3 +169,6 @@ server._respond(req.oauth2, res, function(err) { | ||
req.oauth2.info = info; | ||
req.oauth2.locals = locals; | ||
if (locals) { | ||
req.oauth2.locals = req.oauth2.locals || {}; | ||
utils.merge(req.oauth2.locals, locals); | ||
} | ||
@@ -168,0 +175,0 @@ // A dialog needs to be conducted to obtain the user's approval. |
@@ -19,3 +19,3 @@ var url = require('url') | ||
exports.validate = function(txn) { | ||
if (!txn.redirectURI) { throw new AuthorizationError('Unable to issue redirect for OAuth 2.0 transaction', 'invalid_request'); } | ||
if (!txn.redirectURI) { throw new AuthorizationError('Unable to issue redirect for OAuth 2.0 transaction', 'server_error'); } | ||
}; |
@@ -20,3 +20,3 @@ var url = require('url') | ||
exports.validate = function(txn) { | ||
if (!txn.redirectURI) { throw new AuthorizationError('Unable to issue redirect for OAuth 2.0 transaction', 'invalid_request'); } | ||
if (!txn.redirectURI) { throw new AuthorizationError('Unable to issue redirect for OAuth 2.0 transaction', 'server_error'); } | ||
}; |
{ | ||
"name": "oauth2orize", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "OAuth 2.0 authorization server toolkit for Node.js.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
91646
2238