(sigil xmpp sasl)
(sigil xmpp sasl) - SASL Authentication for XMPP
Implements SCRAM-SHA-1 (RFC 5802) and PLAIN authentication mechanisms.
Exports
make-scram-sha1procedureCreate a SCRAM-SHA-1 authentication state.
(define scram (make-scram-sha1 "user" "password"))scram-initial-messageprocedureGenerate the SCRAM client-first-message (base64-encoded).
Returns the base64-encoded message to send in the SASL auth element.
scram-challenge-responseprocedureProcess SCRAM server challenge and generate client-final-message.
Takes the base64-encoded server challenge, returns the base64-encoded client-final-message.
scram-verify-serverprocedureVerify the server's final response.
Returns #t if the server signature matches, #f otherwise.
sasl-plain-responseprocedureGenerate a PLAIN SASL response (base64-encoded).
Format: base64(0username0password)
select-sasl-mechanismprocedureSelect the best SASL mechanism from a list of server-offered mechanisms.
Returns a symbol: 'scram-sha-1, 'plain, or #f if none supported.