Commit 6187770e authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Drop AUTH_LINKS argument of Web_auth.Make.register

parent f78a6ef7
......@@ -62,6 +62,9 @@ end
module Make (N : NAME) = struct
module L = MakeLinks (N)
let links = (module L : AUTH_LINKS)
let scope = Eliom_common.default_session_scope
let auth_instances = Hashtbl.create 10
......@@ -70,7 +73,7 @@ module Make (N : NAME) = struct
(* Forward reference, will be set to eponymous template *)
let login_choose = ref (fun () -> assert false)
let register auth_services links xs =
let register auth_services xs =
login_choose := Web_templates.choose auth_services links;
List.iter
(fun auth_instance ->
......
......@@ -29,7 +29,7 @@ val register_auth_system : (module AUTH_SYSTEM) -> unit
module MakeLinks (N : NAME) : AUTH_LINKS
module Make (C : NAME) : sig
val register : (module AUTH_SERVICES) -> (module AUTH_LINKS) -> auth_config list -> unit
val register : (module AUTH_SERVICES) -> auth_config list -> unit
module Services : AUTH_SERVICES
module Handlers : AUTH_HANDLERS_PUBLIC
end
......@@ -277,13 +277,8 @@ module Make (D : ELECTION_DATA) (P : WEB_PARAMS) : REGISTRABLE = struct
module Register (X : EMPTY) : ELECTION_HANDLERS = struct
open Eliom_registration
module L = struct
let login x = Eliom_service.preapply election_login ((W.election.e_params.e_uuid, ()), x)
let logout = Eliom_service.preapply election_logout (W.election.e_params.e_uuid, ())
end
let () =
Auth.register (module W.S : AUTH_SERVICES) (module L : AUTH_LINKS) N.auth_config
Auth.register (module W.S : AUTH_SERVICES) N.auth_config
let login service () =
lwt cont = Eliom_reference.get Web_services.cont in
......
......@@ -224,13 +224,8 @@ lwt () =
return ()
) election_ptable
module L = struct
let login x = Eliom_service.preapply site_login x
let logout = Eliom_service.preapply site_logout ()
end
let install_authentication auth_configs =
Web_site_auth.register (module Web_site_auth : AUTH_SERVICES) (module L : AUTH_LINKS) auth_configs
Web_site_auth.register (module Web_site_auth : AUTH_SERVICES) auth_configs
let () = Any.register ~service:home
(fun () () ->
......
open Web_serializable_t
open Web_signatures
val register : (module AUTH_SERVICES) -> (module AUTH_LINKS) -> auth_config list -> unit
val register : (module AUTH_SERVICES) -> auth_config list -> unit
include AUTH_SERVICES
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