--------------------- PatchSet 5172 Date: 2007/08/06 11:13:47 Author: amosjeffries Branch: docs Tag: (none) Log: Migrate more Authentication Framework documentation into the source code. Members: doc/Programming-Guide/AuthenticationFramework.dox:1.1.2.6->1.1.2.7 src/AuthConfig.h:1.3.2.1->1.3.2.2 src/AuthScheme.h:1.1.28.1->1.1.28.2 src/AuthUserRequest.h:1.8.2.3->1.8.2.4 src/auth/basic/basicScheme.h:1.1->1.1.28.1 Index: squid3/doc/Programming-Guide/AuthenticationFramework.dox =================================================================== RCS file: /cvsroot/squid-sf//squid3/doc/Programming-Guide/Attic/AuthenticationFramework.dox,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid3/doc/Programming-Guide/AuthenticationFramework.dox 6 Aug 2007 08:46:37 -0000 1.1.2.6 +++ squid3/doc/Programming-Guide/AuthenticationFramework.dox 6 Aug 2007 11:13:47 -0000 1.1.2.7 @@ -50,7 +50,7 @@ \subsection Functions Function typedefs -\par This documentation is largely obsolete and merged into C++ classes instead. +\todo Migrate the function typedef documentation to the relevant code positions. \par Each function related to the general case of HTTP authentication has @@ -107,12 +107,6 @@ remove scheme local configuration dependent data. (Ie cached user details that are only relevant to a config setting). -\par typedef void AUTHSDUMP(StoreEntry *, const char *, authScheme *); - Functions of type AUTHSDUMP are responsible for writing - to the StoreEntry the configuration parameters that a user - would put in a config file to recreate the running - configuration. - \par typedef void AUTHSSTATS(StoreEntry *); Functions of type AUTHSSTATS are called by the cachemgr to provide statistics on the authmodule. Current modules @@ -188,10 +182,6 @@ scheme specific activities related to the request or connection are in progress, this function MUST clear them. -\par typedef void AUTHSSTART(auth_user_request_t * , RH * , void *); - This function type is called when squid is ready to put the request - on hold and wait for a callback from the auth module when the auth - module has performed it's external activities. \subsection DataStructures Data Structures Index: squid3/src/AuthConfig.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AuthConfig.h,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -u -r1.3.2.1 -r1.3.2.2 --- squid3/src/AuthConfig.h 6 Aug 2007 08:34:10 -0000 1.3.2.1 +++ squid3/src/AuthConfig.h 6 Aug 2007 11:13:47 -0000 1.3.2.2 @@ -1,6 +1,6 @@ /* - * $Id: AuthConfig.h,v 1.3.2.1 2007/08/06 08:34:10 amosjeffries Exp $ + * $Id: AuthConfig.h,v 1.3.2.2 2007/08/06 11:13:47 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -86,10 +86,9 @@ */ virtual void done() = 0; - /* is this config complete enough to run */ /** * The configured function is used to see if the auth module has been given valid - * parameters and is able to handle authentication requests if initialised. + * parameters and is able to handle authentication requests. * * \retval true Authentication Module configured ready for use. * \retval false Not configured or Configuration Error. @@ -97,8 +96,12 @@ */ virtual bool configured() const = 0; - /* output the parameters */ + /** + * Responsible for writing to the StoreEntry the configuration parameters that a user + * would put in a config file to recreate the running configuration. + */ virtual void dump(StoreEntry *, const char *, AuthConfig *) = 0; + /* add headers as needed when challenging for auth */ virtual void fixHeader(AuthUserRequest *, HttpReply *, http_hdr_type, HttpRequest *) = 0; /* prepare to handle requests */ Index: squid3/src/AuthScheme.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AuthScheme.h,v retrieving revision 1.1.28.1 retrieving revision 1.1.28.2 diff -u -r1.1.28.1 -r1.1.28.2 --- squid3/src/AuthScheme.h 6 Aug 2007 05:18:23 -0000 1.1.28.1 +++ squid3/src/AuthScheme.h 6 Aug 2007 11:13:47 -0000 1.1.28.2 @@ -1,6 +1,6 @@ /* - * $Id: AuthScheme.h,v 1.1.28.1 2007/08/06 05:18:23 amosjeffries Exp $ + * $Id: AuthScheme.h,v 1.1.28.2 2007/08/06 11:13:47 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -38,7 +38,13 @@ #include "Array.h" /** + * \defgroup AuthSchemeAPI * \ingroup AuthAPI + */ + +/** + * \ingroup AuthAPI + * \ingroup AuthSchemeAPI * I represent a authentication scheme. For now my children * store both the scheme metadata, and the scheme configuration. * \par @@ -46,7 +52,6 @@ * a new class AuthConfiguration should be made, and the * config specific calls on AuthScheme moved to it. */ - class AuthScheme { Index: squid3/src/AuthUserRequest.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AuthUserRequest.h,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -u -r1.8.2.3 -r1.8.2.4 --- squid3/src/AuthUserRequest.h 6 Aug 2007 08:34:10 -0000 1.8.2.3 +++ squid3/src/AuthUserRequest.h 6 Aug 2007 11:13:47 -0000 1.8.2.4 @@ -1,6 +1,6 @@ /* - * $Id: AuthUserRequest.h,v 1.8.2.3 2007/08/06 08:34:10 amosjeffries Exp $ + * $Id: AuthUserRequest.h,v 1.8.2.4 2007/08/06 11:13:47 amosjeffries Exp $ * * DO NOT MODIFY NEXT 2 LINES: * arch-tag: 674533af-8b21-4641-b71a-74c4639072a0 @@ -94,8 +94,16 @@ virtual void addHeader(HttpReply * rep, int accel); virtual void addTrailer(HttpReply * rep, int accel); virtual void onConnectionClose(ConnStateData *); - /* template method */ - virtual void module_start(RH *, void *) = 0; + + /** + * Called when squid is ready to put the request on hold and wait for a callback from the auth module + * when the auth module has performed it's external activities. + * + * \param handler Handler to process the callback when its run + * \param data CBDATA for handler + */ + virtual void module_start(RH *handler, void *data) = 0; + virtual AuthUser *user() {return _auth_user;} virtual const AuthUser *user() const {return _auth_user;} Index: squid3/src/auth/basic/basicScheme.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/auth/basic/basicScheme.h,v retrieving revision 1.1 retrieving revision 1.1.28.1 diff -u -r1.1 -r1.1.28.1 --- squid3/src/auth/basic/basicScheme.h 31 Aug 2004 02:14:29 -0000 1.1 +++ squid3/src/auth/basic/basicScheme.h 6 Aug 2007 11:13:48 -0000 1.1.28.1 @@ -1,6 +1,6 @@ /* - * $Id: basicScheme.h,v 1.1 2004/08/31 02:14:29 squidadm Exp $ + * $Id: basicScheme.h,v 1.1.28.1 2007/08/06 11:13:48 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -36,6 +36,8 @@ #include "AuthScheme.h" +/// \ingroup AuthAPI +/// \ingroup AuthSchemeAPI class basicScheme : public AuthScheme {