Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
4b24fdb5
Commit
4b24fdb5
authored
Mar 20, 2015
by
Stephane Glondu
Browse files
Simplification
parent
09378e55
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/web/web_auth.ml
View file @
4b24fdb5
...
...
@@ -142,26 +142,24 @@ module Make (N : NAME) = struct
)
)
xs
let
login_handler
service
cont
=
let
cont
()
()
=
match
service
with
|
Some
name
->
do_login_using
name
cont
|
None
->
match
!
auth_instance_names
with
|
[
name
]
->
do_login_using
name
cont
|
_
->
Web_templates
.
choose
auth_services
links
()
>>=
Eliom_registration
.
Html5
.
send
in
match_lwt
Eliom_reference
.
get
user
with
|
Some
u
->
let
module
A
=
(
val
u
.
user_handlers
)
in
A
.
logout
cont
()
|
None
->
cont
()
()
module
Handlers
:
AUTH_HANDLERS_PUBLIC
=
struct
let
do_login
service
cont
()
=
login_handler
service
cont
let
do_login
service
cont
()
=
let
cont
()
()
=
match
service
with
|
Some
name
->
do_login_using
name
cont
|
None
->
match
!
auth_instance_names
with
|
[
name
]
->
do_login_using
name
cont
|
_
->
Web_templates
.
choose
auth_services
links
()
>>=
Eliom_registration
.
Html5
.
send
in
match_lwt
Eliom_reference
.
get
user
with
|
Some
u
->
let
module
A
=
(
val
u
.
user_handlers
)
in
A
.
logout
cont
()
|
None
->
cont
()
()
let
do_logout
cont
()
=
match_lwt
Eliom_reference
.
get
user
with
...
...
Write
Preview
Supports
Markdown
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