Skip to content

Commit

Permalink
Expose full request.auth to validation context. Closes #2886
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Jan 2, 2016
1 parent df6fffd commit 70b31a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lib/request.js
Expand Up @@ -99,7 +99,10 @@ internals.Request = function (connection, req, res, options) {
this.auth = {
isAuthenticated: false,
credentials: options.credentials || null, // Special keys: 'app', 'user', 'scope'
artifacts: options.artifacts || null // Scheme-specific artifacts
artifacts: options.artifacts || null, // Scheme-specific artifacts
strategy: null,
mode: null,
error: null
};

this.pre = {}; // Pre raw values
Expand Down
5 changes: 1 addition & 4 deletions lib/validation.js
Expand Up @@ -116,10 +116,7 @@ internals.input = function (source, request, next) {
params: request.params,
query: request.query,
payload: request.payload,
auth: {
isAuthenticated: request.auth.isAuthenticated,
credentials: request.auth.credentials
}
auth: request.auth
}
};

Expand Down

0 comments on commit 70b31a6

Please sign in to comment.