diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-10 01:59:10 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-10 01:59:10 +0200 |
commit | 75867e5049765069c5ad4e083404b6966b1d52cf (patch) | |
tree | 55109178b1bb25086e1fb8f1c56d19965f0a9f07 /lib | |
parent | d29757247f2e7a99c16eeb10c9bb0e9f1b672432 (diff) |
feat(auth): replace authenticate with send_auth_stanza function
Diffstat (limited to 'lib')
-rw-r--r-- | lib/auth.ml | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/auth.ml b/lib/auth.ml index 0e5d77c..dfe5cfb 100644 --- a/lib/auth.ml +++ b/lib/auth.ml @@ -1,11 +1,6 @@ -open Lwt.Syntax - type auth_mechanism = PLAIN [@@deriving show { with_path = false }] -let authenticate (stream, _push) = - let _gen_auth jid pass = function +let send_auth_stanza (_stream, _push) jid pass mechanism = + let gen_auth = function | PLAIN -> Base64.encode_exn ("\x00" ^ jid ^ "\x00" ^ pass) - in - let+ features = Lwt_stream.get stream - in Option.get features - + in gen_auth mechanism |