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

Improve messages in security log

parent a3d093b6
......@@ -110,6 +110,11 @@ module Make (C : CONFIG) (N : NAME) (T : TEMPLATES) : AUTH_HANDLERS = struct
| None ->
match_lwt Eliom_reference.get logout_cont with
| None ->
lwt () = security_log (fun () ->
Printf.sprintf
"user is trying to log in, redirecting to CAS [%s]"
C.server
) in
Eliom_service.preapply cas_login self |>
Eliom_registration.Redirection.send
| Some cont ->
......
......@@ -91,11 +91,11 @@ module Make (N : CONFIG) = struct
module Register (C : CONT_SERVICE) (T : TEMPLATES) : EMPTY = struct
let on_success user_domain user_handlers user_name () =
let user_user = {user_domain; user_name} in
security_log (fun () ->
Printf.sprintf "%s successfully logged on %s using %s"
user_name N.name user_domain
Printf.sprintf "%s successfully logged into %s"
(string_of_user user_user) N.name
) >>
let user_user = {user_domain; user_name} in
let logged_user = {user_user; user_handlers} in
Eliom_reference.set user (Some logged_user) >>
C.cont () >>= Eliom_registration.Redirection.send
......
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