Skip to content
GitLab
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
b3ad3752
Commit
b3ad3752
authored
Apr 04, 2014
by
Stephane Glondu
Browse files
Bugfix in Auth_cas: lazy computation of self URI
It matters behind a reverse-proxy.
parent
8ab43f18
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/web/auth_cas.ml
View file @
b3ad3752
...
...
@@ -63,7 +63,7 @@ module Make (C : CONFIG) (N : NAME) (T : LOGIN_TEMPLATES) : AUTH_HANDLERS = stru
let
service
=
Eliom_service
.
preapply
login_cas
None
let
self
=
Eliom_uri
.
make_string_uri
~
absolute
:
true
~
service
()
|>
rewrite_prefix
lazy
(
Eliom_uri
.
make_string_uri
~
absolute
:
true
~
service
()
|>
rewrite_prefix
)
let
login_cont
=
Eliom_reference
.
eref
~
scope
None
let
logout_cont
=
Eliom_reference
.
eref
~
scope
None
...
...
@@ -74,7 +74,7 @@ module Make (C : CONFIG) (N : NAME) (T : LOGIN_TEMPLATES) : AUTH_HANDLERS = stru
match
ticket
with
|
Some
x
->
let
validation
=
let
service
=
Eliom_service
.
preapply
cas_validate
(
self
,
x
)
in
let
service
=
Eliom_service
.
preapply
cas_validate
(
Lazy
.
force
self
,
x
)
in
Eliom_uri
.
make_string_uri
~
absolute
:
true
~
service
()
in
lwt
reply
=
Ocsigen_http_client
.
get_url
validation
in
...
...
@@ -112,7 +112,7 @@ module Make (C : CONFIG) (N : NAME) (T : LOGIN_TEMPLATES) : AUTH_HANDLERS = stru
"user is trying to log in, redirecting to CAS [%s]"
C
.
server
)
in
Eliom_service
.
preapply
cas_login
(
self
,
Some
true
)
|>
Eliom_service
.
preapply
cas_login
(
Lazy
.
force
self
,
Some
true
)
|>
Eliom_registration
.
Redirection
.
send
|
Some
cont
->
Eliom_reference
.
unset
logout_cont
>>
...
...
@@ -128,7 +128,7 @@ module Make (C : CONFIG) (N : NAME) (T : LOGIN_TEMPLATES) : AUTH_HANDLERS = stru
Printf
.
sprintf
"user logged out, redirecting to CAS [%s]"
C
.
server
)
>>
lwt
()
=
Eliom_reference
.
set
logout_cont
(
Some
cont
)
in
Eliom_service
.
preapply
cas_logout
self
|>
Eliom_service
.
preapply
cas_logout
(
Lazy
.
force
self
)
|>
Eliom_registration
.
Redirection
.
send
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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