From 627330f670ad7921044592ca72819f7ee6ed3fa0 Mon Sep 17 00:00:00 2001 From: thomascube Date: Mon, 3 Oct 2005 20:25:31 +0000 Subject: Minor bugfixes and SMTP support --- program/lib/Auth/SASL/Plain.php | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 program/lib/Auth/SASL/Plain.php (limited to 'program/lib/Auth/SASL/Plain.php') diff --git a/program/lib/Auth/SASL/Plain.php b/program/lib/Auth/SASL/Plain.php new file mode 100755 index 000000000..57894d042 --- /dev/null +++ b/program/lib/Auth/SASL/Plain.php @@ -0,0 +1,63 @@ + | +// +-----------------------------------------------------------------------+ +// +// $Id$ + +/** +* Implmentation of PLAIN SASL mechanism +* +* @author Richard Heyes +* @access public +* @version 1.0 +* @package Auth_SASL +*/ + +require_once('Auth/SASL/Common.php'); + +class Auth_SASL_Plain extends Auth_SASL_Common +{ + /** + * Returns PLAIN response + * + * @param string $authcid Authentication id (username) + * @param string $pass Password + * @param string $authzid Autorization id + * @return string PLAIN Response + */ + function getResponse($authcid, $pass, $authzid = '') + { + return $authzid . chr(0) . $authcid . chr(0) . $pass; + } +} +?> -- cgit v1.2.3