minimal passport
This commit is contained in:
16
server-node/src/auth/user/user-controller.ts
Normal file
16
server-node/src/auth/user/user-controller.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { User } from "./user-model";
|
||||
|
||||
export function findOne(params: {id?: number, username?: string}, cb: (err: Error | null, user: User) => void): undefined {
|
||||
//TODO: replace with db connection.
|
||||
cb(null, {
|
||||
id: 1,
|
||||
username: "test",
|
||||
mail: "test@test.com",
|
||||
accessControlList: []
|
||||
});
|
||||
}
|
||||
|
||||
export function verifyPassword(user: User, password: string) {
|
||||
//TODO: replace with db connection.
|
||||
return password == "test";
|
||||
}
|
||||
Reference in New Issue
Block a user