Skip to content

Commit 121ae6b

Browse files
authored
correct passport authorization (#4)
1 parent de8cfcf commit 121ae6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@themost/test",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "MOST Web Framework Test Api Server",
55
"repository": "https://github.com/themost-framework/themost-test.git",
66
"author": "Kyriakos Barbounakis<k.barbounakis@gmail.com>",

modules/test/server/routes/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function authRouter() {
5151
}
5252
// find user from token info
5353
// noinspection JSUnresolvedFunction
54-
return req.context.model('User').where('name').equal(info.username).silent().getItem().then( user => {
54+
return req.context.model('User').where('name').equal(info.user_id).silent().getItem().then( user => {
5555
// user cannot be found and of course cannot be authenticated (throw forbidden error)
5656
if (user == null) {
5757
return done(new HttpForbiddenError());

0 commit comments

Comments
 (0)