Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
6187770e
Commit
6187770e
authored
Mar 20, 2015
by
Stephane Glondu
Browse files
Drop AUTH_LINKS argument of Web_auth.Make.register
parent
f78a6ef7
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/web/web_auth.ml
View file @
6187770e
...
...
@@ -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
->
...
...
src/web/web_auth.mli
View file @
6187770e
...
...
@@ -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
src/web/web_election.ml
View file @
6187770e
...
...
@@ -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
...
...
src/web/web_site.ml
View file @
6187770e
...
...
@@ -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
()
()
->
...
...
src/web/web_site_auth.mli
View file @
6187770e
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment