2020-04-22 10:07:04 -04:00
|
|
|
async function register ({
|
|
|
|
registerIdAndPassAuth,
|
|
|
|
peertubeHelpers
|
|
|
|
}) {
|
|
|
|
registerIdAndPassAuth({
|
2020-04-23 05:36:50 -04:00
|
|
|
authName: 'laguna-bad-auth',
|
2020-04-22 10:07:04 -04:00
|
|
|
|
|
|
|
onLogout: () => {
|
|
|
|
peertubeHelpers.logger.info('On logout for auth 3 - 1')
|
|
|
|
},
|
|
|
|
|
|
|
|
getWeight: () => 5,
|
|
|
|
|
|
|
|
login (body) {
|
|
|
|
if (body.id === 'laguna' && body.password === 'laguna password') {
|
|
|
|
return Promise.resolve({
|
|
|
|
username: 'laguna',
|
|
|
|
email: 'laguna@example.com',
|
|
|
|
displayName: 'Laguna Loire'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
async function unregister () {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
register,
|
|
|
|
unregister
|
|
|
|
}
|
|
|
|
|
|
|
|
// ###########################################################################
|