diff options
-rw-r--r-- | lib/auth.ml | 3 | ||||
-rw-r--r-- | lib/dune | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/auth.ml b/lib/auth.ml index 509f2d1..851db40 100644 --- a/lib/auth.ml +++ b/lib/auth.ml @@ -3,6 +3,9 @@ open Lwt.Syntax type auth_mechanism = PLAIN [@@deriving show] let authenticate (stream, _push) = + let _gen_auth jid pass = function + | PLAIN -> Base64.encode_exn ("\x00" ^ jid ^ "\x00" ^ pass) + in let+ features = Lwt_stream.get stream in Option.get features @@ -2,5 +2,6 @@ (public_name flesh) (libraries lwt + base64 portal) (preprocess (pps ppx_deriving.show))) |