Commit 4c5274c4 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Log successful logins to security_log

parent 4d614457
......@@ -52,6 +52,10 @@ module Make (X : EMPTY) = struct
let on_success user_admin user_type ~user_name ~user_logout =
let user_user = {user_type; user_name} in
let logged_user = {user_admin; user_user; user_logout} in
security_log (fun () ->
Printf.sprintf "%s successfully logged in%s using %s"
user_name (if user_admin then " (as admin)" else "") user_type
) >>
Eliom_reference.set user (Some logged_user)
module Services : AUTH_SERVICES = struct
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