Log event for external login
This commit is contained in:
@@ -422,9 +422,12 @@ var authorization = [
|
||||
if (type === clients.TYPE_ADMIN) {
|
||||
eventlog.add(eventlog.ACTION_USER_LOGIN, auditSource(req, 'admin'), { userId: req.oauth2.user.id });
|
||||
return next();
|
||||
} else if (type === clients.TYPE_EXTERNAL) {
|
||||
eventlog.add(eventlog.ACTION_USER_LOGIN, auditSource(req, 'external'), { userId: req.oauth2.user.id });
|
||||
return next();
|
||||
} else if (type === clients.TYPE_SIMPLE_AUTH) {
|
||||
return sendError(req, res, 'Unknown OAuth client.');
|
||||
}
|
||||
if (type === clients.TYPE_EXTERNAL) return next();
|
||||
if (type === clients.TYPE_SIMPLE_AUTH) return sendError(req, res, 'Unknown OAuth client.');
|
||||
|
||||
appdb.get(req.oauth2.client.appId, function (error, appObject) {
|
||||
if (error) return sendErrorPageOrRedirect(req, res, 'Invalid request. Unknown app for this client_id.');
|
||||
|
||||
Reference in New Issue
Block a user