Imported upstream version 0.61.0
[hcoop/debian/courier-authlib.git] / courierauthsasl.h
index ac00fec..fef2335 100644 (file)
@@ -13,7 +13,7 @@
 extern "C" {
 #endif
 
-static const char courierauthsasl_h_rcsid[]="$Id: courierauthsasl.h,v 1.1 2004/10/21 00:10:49 mrsam Exp $";
+static const char courierauthsasl_h_rcsid[]="$Id: courierauthsasl.h,v 1.2 2008/06/29 16:39:25 mrsam Exp $";
 
 /*
        These family of functions are used to implement the SASL interface
@@ -23,7 +23,7 @@ static const char courierauthsasl_h_rcsid[]="$Id: courierauthsasl.h,v 1.1 2004/1
 */
 
 /*
-**     auth_sasl searched for the right method, and calls the appropriate
+**     auth_sasl searches for the right method, and calls the appropriate
 **     sasl function.  authsasl received the following arguments:
 **
 **     initresponse -- initial response for the authentication request,
@@ -49,6 +49,20 @@ int auth_sasl(const char *,          /* Method */
              char **,                  /* Returned - AUTHTYPE */
              char **);                 /* Returned - AUTHDATA */
 
+/*
+** auth_sasl_ex() is a version of auth_sasl that takes an extra parameter,
+** externalauth. If method is "EXTERNAL" and externalauth is not a NULL pointer
+** and does not point to an empty string, it is recognized as a SASL EXTERRNAL
+** authentication.
+*/
+
+int auth_sasl_ex(const char *method,
+                const char *initresponse,
+                const char *externalauth, /* out-of-band authentified identity */
+                char *(*callback_func)(const char *, void *),
+                void *callback_arg,
+                char **authtype_ptr,
+                char **authdata_ptr);
 
        /* INTERNAL FUNCTIONS BELOW */