started tokenauth integration
This commit is contained in:
parent
402ae80b2b
commit
c9adc36f72
2
Makefile
2
Makefile
@ -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
|
||||
|
@ -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.(>>=)
|
||||
|
Loading…
x
Reference in New Issue
Block a user