2020-04-07 21:34:21 +02:00
|
|
|
const couchdb = require("../../db");
|
|
|
|
|
|
|
|
const controller = {
|
|
|
|
forgotPassword: async ctx => {
|
|
|
|
|
|
|
|
},
|
|
|
|
setPassword: async ctx => {
|
|
|
|
|
|
|
|
},
|
|
|
|
changePassword: async ctx => {
|
|
|
|
|
|
|
|
},
|
|
|
|
authenticate: async ctx => {
|
2020-04-20 17:17:11 +02:00
|
|
|
// const user = await ctx.master.authenticate(
|
|
|
|
// ctx.sessionId,
|
|
|
|
// ctx.params.appname,
|
|
|
|
// ctx.request.body.username,
|
|
|
|
// ctx.request.body.password
|
|
|
|
// )
|
2020-04-07 21:34:21 +02:00
|
|
|
|
2020-04-20 17:17:11 +02:00
|
|
|
// if (!user) {
|
|
|
|
// ctx.throw(StatusCodes.UNAUTHORIZED, "invalid username or password")
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ctx.body = user.user_json
|
|
|
|
// ctx.response.status = StatusCodes.OK
|
2020-04-07 21:34:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = controller;
|