Commit 5a2f384d authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Parametrization and documentation of CAS authentication

parent d43669ee
......@@ -158,6 +158,12 @@ has been generated with the following shell command:
for u in `seq 1 5`; do SALT=`pwgen`; PASS=`pwgen`; echo "user$u,$SALT,$(echo -n "$SALT$PASS" | sha256sum | read a b; echo $a),$PASS"; done
There is also the possibility to authenticate with a
[CAS](http://www.jasig.org/cas) server. To do that, use the
`<enable-cas>` instead of other `<enable-*>` tags:
<enable-cas server="https://cas.example.org"/>
The `<source>` tag gives the path of the source tarball. Note that this
is a path on the local filesystem and not a URL. If you made local
changes, an easy way to comply with the AGPL license is to commit them
......
......@@ -51,6 +51,7 @@ let source_file = ref None
let enable_dummy = ref false
let password_db_fname = ref None
let enable_cas = ref false
let cas_server = ref "https://cas.example.org"
let admin_hash = ref ""
let main_election = ref None
......@@ -92,7 +93,9 @@ let () =
~name:"enable-cas"
~obligatory:false
~init:(fun () -> enable_cas := true)
();
~attributes:[
attribute ~name:"server" ~obligatory:true (fun s -> cas_server := s);
] ();
element
~name:"admin"
~obligatory:true
......@@ -137,22 +140,20 @@ let login_admin = Eliom_service.service
~get_params:Eliom_parameter.unit
()
let cas_server = "https://cas.inria.fr"
let cas_login = Eliom_service.external_service
~prefix:cas_server
~prefix:!cas_server
~path:["cas"; "login"]
~get_params:Eliom_parameter.(string "service")
()
let cas_logout = Eliom_service.external_service
~prefix:cas_server
~prefix:!cas_server
~path:["cas"; "logout"]
~get_params:Eliom_parameter.(string "service")
()
let cas_validate = Eliom_service.external_service
~prefix:cas_server
~prefix:!cas_server
~path:["cas"; "validate"]
~get_params:Eliom_parameter.(string "service" ** string "ticket")
()
......
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