]> git.ipfire.org Git - thirdparty/squid.git/commit
SourceLayout: Add enum Direction for AuthUserRequests state logics
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 20 Apr 2011 05:08:16 +0000 (17:08 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 20 Apr 2011 05:08:16 +0000 (17:08 +1200)
commit51a3dd58359bf26bb2bcfeb1f09a0acdf901dd41
tree6d8d159974f09b367620f7c4a5539267412b0812
parent3a2e025344bbe7244960ee5878be960b113c95a9
SourceLayout: Add enum Direction for AuthUserRequests state logics

The state of credentials lookup and handling is recorded by
authenticateDirection / AuthUserRequest::direction() and its per-scheme
helper methods AuthUserRequest::module_direction().

This formalizes and coordinates the state being returned by using a
shared enum.

The states can generally be considerd as:
 - LOOKUP with a helper still needs to validate the credentials
 - CHALLENGE if the helepr needs more info from the client
 - VALID if everything is fine and the credentials are known Good/Bad
 - ERROR if there is any problem with the state or credentials

TODO:
 This combination has highlighted a few strange things in the NTLM and
Negotiate states. Where known but Failed credentials are marked as ERROR.
This needs closer investigation why it is not a CHALLENGE in all auth
schemes.

 Also there is a little obfuscation of the cases around the generalized
fixHeader() calls. This will be handled in a followup patch.
src/auth/UserRequest.cc
src/auth/UserRequest.h
src/auth/basic/UserRequest.cc
src/auth/basic/UserRequest.h
src/auth/digest/UserRequest.cc
src/auth/digest/UserRequest.h
src/auth/negotiate/UserRequest.cc
src/auth/negotiate/UserRequest.h
src/auth/ntlm/UserRequest.cc
src/auth/ntlm/UserRequest.h