#include <auth_basic.h>

Inheritance diagram for AuthBasicConfig:
Collaboration diagram for AuthBasicConfig:

List of all members.

Public Member Functions

 AuthBasicConfig ()
 ~AuthBasicConfig ()
virtual bool active () const
virtual bool configured () const
virtual AuthUserRequest::Pointer decode (char const *proxy_auth)
virtual void done ()
virtual void rotateHelpers ()
virtual void dump (StoreEntry *, const char *, AuthConfig *)
virtual void fixHeader (AuthUserRequest::Pointer, HttpReply *, http_hdr_type, HttpRequest *)
virtual void init (AuthConfig *)
virtual void parse (AuthConfig *, int, char *)
virtual void registerWithCacheManager (void)
virtual const char * type () const

Static Public Member Functions

static AuthUserRequest::Pointer CreateAuthUser (const char *proxy_auth)
static AuthConfigFind (const char *proxy_auth)

Public Attributes

char * basicAuthRealm
time_t credentialsTTL
int casesensitive
int utf8
HelperChildConfig authenticateChildren
wordlistauthenticate

Detailed Description

Definition at line 67 of file auth_basic.h.


Constructor & Destructor Documentation

AuthBasicConfig::AuthBasicConfig (  ) 

Definition at line 239 of file auth_basic.cc.

References basicAuthRealm, and xstrdup().

AuthBasicConfig::~AuthBasicConfig (  ) 

Definition at line 247 of file auth_basic.cc.

References basicAuthRealm, and safe_free.


Member Function Documentation

bool AuthBasicConfig::active (  )  const [virtual]

Used by squid to determine whether the auth module has successfully initialised itself with the current configuration.

Return values:
true Authentication Module loaded and running.
false No Authentication Module loaded.

Implements AuthConfig.

Definition at line 71 of file auth_basic.cc.

References authbasic_initialised.

bool AuthBasicConfig::configured (  )  const [virtual]

The configured function is used to see if the auth module has been given valid parameters and is able to handle authentication requests.

Return values:
true Authentication Module configured ready for use.
false Not configured or Configuration Error. No other module functions except Shutdown/Dump/Parse/FreeConfig will be called by Squid.

Implements AuthConfig.

Definition at line 77 of file auth_basic.cc.

References AuthConfig::authenticate, AuthConfig::authenticateChildren, basicAuthRealm, debugs, HERE, HelperChildConfig::n_max, and NULL.

AuthUserRequest::Pointer AuthConfig::CreateAuthUser ( const char *  proxy_auth  )  [static, inherited]

Get Auth User: Return a filled out auth_user structure for the given Proxy Auth (or Auth) header. It may be a cached Auth User or a new Unauthenticated structure. The structure is given an inital lock here. It may also be NULL reflecting that no user could be created.

Definition at line 48 of file Config.cc.

References AuthConfig::active(), assert, debugs, AuthConfig::decode(), AuthConfig::Find(), and NULL.

Referenced by AuthUserRequest::authenticate(), testAuthConfig::create(), and testAuthUserRequest::scheme().

AuthUserRequest::Pointer AuthBasicConfig::decode ( char const *  proxy_auth  )  [virtual]

Decode a Basic [Proxy-]Auth string, linking the passed auth_user_request structure to any existing user structure or creating one if needed. Note that just returning will be treated as "cannot decode credentials". Use the message field to return a descriptive message to the user.

Implements AuthConfig.

Definition at line 466 of file auth_basic.cc.

References AuthUser::addToNameCache(), assert, AuthUser::auth_type, authBasicAuthUserFindUsername(), current_time, debugs, BasicUser::decode(), AuthUser::expiretime, RefCount< C >::getRaw(), HERE, BasicUser::makeLoggingInstance(), NULL, BasicUser::updateCached(), AuthUser::username(), BasicUser::valid(), xisgraph, and xisspace.

void AuthBasicConfig::done (  )  [virtual]

shutdown the auth helpers and free any allocated configuration details

Implements AuthConfig.

Definition at line 140 of file auth_basic.cc.

References authbasic_initialised, AuthConfig::authenticate, basicAuthRealm, helperShutdown(), safe_free, and wordlistDestroy().

void AuthBasicConfig::dump ( StoreEntry ,
const char *  ,
AuthConfig  
) [virtual]

Responsible for writing to the StoreEntry the configuration parameters that a user would put in a config file to recreate the running configuration.

Implements AuthConfig.

Definition at line 221 of file auth_basic.cc.

References AuthConfig::authenticate, AuthConfig::authenticateChildren, basicAuthRealm, casesensitive, HelperChildConfig::concurrency, credentialsTTL, wordlist::key, HelperChildConfig::n_idle, HelperChildConfig::n_max, HelperChildConfig::n_startup, wordlist::next, NULL, and storeAppendPrintf().

void AuthBasicConfig::fixHeader ( AuthUserRequest::Pointer  ,
HttpReply ,
http_hdr_type  ,
HttpRequest  
) [virtual]

add headers as needed when challenging for auth

Implements AuthConfig.

Definition at line 119 of file auth_basic.cc.

References AuthConfig::authenticate, basicAuthRealm, debugs, HttpMsg::header, HERE, and httpHeaderPutStrf().

void AuthBasicConfig::init ( AuthConfig schemeCfg  )  [virtual]

Initialize helpers and the like for this auth scheme. Called AFTER parsing the config file

Implements AuthConfig.

Definition at line 524 of file auth_basic.cc.

References authbasic_initialised, AuthConfig::authenticate, AuthConfig::authenticateChildren, CBDATA_INIT_TYPE, helper::childs, helper::cmdline, helperOpenServers(), helper::ipc_type, and NULL.

void AuthBasicConfig::registerWithCacheManager ( void   )  [virtual]

expose any/all statistics to a CacheManager

Reimplemented from AuthConfig.

Definition at line 545 of file auth_basic.cc.

References authenticateBasicStats, and CacheManager::GetInstance().

void AuthBasicConfig::rotateHelpers (  )  [virtual]

Shutdown just the auth helpers. For use by log rotate etc. where auth needs to stay running, with the helpers restarted.

Implements AuthConfig.

Definition at line 128 of file auth_basic.cc.

References helperShutdown().

const char * AuthBasicConfig::type (  )  const [virtual]

the http string id

Implements AuthConfig.

Definition at line 90 of file auth_basic.cc.

References basicScheme::GetInstance().


Member Data Documentation

Definition at line 86 of file auth_basic.h.

Referenced by dump(), and parse().

Definition at line 85 of file auth_basic.h.

Referenced by dump(), and parse().

Definition at line 87 of file auth_basic.h.

Referenced by parse().


The documentation for this class was generated from the following files:

Search

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors