Commit 1c63a576 authored by Nelson GONCALVES's avatar Nelson GONCALVES
Browse files

Fix error if user was not authentified

parent c0981556
......@@ -128,7 +128,6 @@ async function serviceValidate(ticket,service) {
const user = getUserFromTicket(body);
if(!user) {
laclasseLogger.error('authenticate: Ticket couldn\'t be validated', err);
return false
}
return user;
......@@ -186,7 +185,7 @@ exports.authenticate = async function (hook_name, context, cb) {
ticket = context.req.query.ticket;
const user = await serviceValidate(context.req.query.ticket, getServiceURL(context.req));
if(!user) return cb([false]);
// User authenticated, save off some information needed for authorization
context.req.session.user = {
username: user.uid,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment