started tokenauth integration

This commit is contained in:
Stavros Polymenis 2016-11-29 21:14:52 +00:00
parent 402ae80b2b
commit c9adc36f72
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
OCB_FLAGS = -use-ocamlfind -I src # -I lib
OCB = ocamlbuild $(OCB_FLAGS)
PKGS = toml,uuidm,omd,str,batteries,lens,lwt,lwt.unix,ptime,ptime.clock.os,re.str,lens.ppx_deriving
WEB_PKGS = $(PKGS),opium.unix,tyxml,mustache
WEB_PKGS = $(PKGS),opium.unix,tyxml,mustache,tokenauth
CMD_PKGS = $(PKGS),cmdliner
all: cmd web

View File

@ -58,6 +58,11 @@ let ymd_or_error y = match y with Some (path, meta) -> Logarion.of_file ("ymd/"
let webcfg = Configuration.of_filename "web.toml"
let lgrn = Logarion.Configuration.of_filename "logarion.toml"
let token config rand_state dbs =
match Tokenauth.(member dbs.members "test@test") with
| Some m -> ignore @@ Tokenauth.(token_spawn config rand_state dbs.tokens m);
| None -> ()
let () =
Random.self_init();
let (>>=) = Lwt.(>>=)