#include <User.h>

Inheritance diagram for Auth::User:
Collaboration diagram for Auth::User:

Public Types

typedef RefCount< UserPointer
 

Public Member Functions

virtual ~User ()
 
void absorb (Auth::User::Pointer from)
 
char const * username () const
 
void username (char const *)
 set stored username and userKey More...
 
const SBuf userKey () const
 
virtual int32_t ttl () const =0
 
void clearIp ()
 
void removeIp (Ip::Address)
 
void addIp (Ip::Address)
 
virtual void addToNameCache ()=0
 add the Auth::User to the protocol-specific username cache. More...
 
CredentialState credentials () const
 
void credentials (CredentialState)
 

Static Public Member Functions

static SBuf BuildUserKey (const char *username, const char *realm)
 
static void CredentialsCacheStats (StoreEntry *output)
 
static CbcPointer
< Auth::CredentialsCache
Cache ()
 

Public Attributes

Auth::Type auth_type
 
Auth::SchemeConfigconfig
 
dlink_list proxy_match_cache
 
size_t ipcount
 
long expiretime
 
NotePairs notes
 list of key=value pairs the helper produced More...
 

Protected Member Functions

 User (Auth::SchemeConfig *, const char *requestRealm)
 

Private Attributes

CredentialState credentials_state
 
const char * username_
 
SBuf requestRealm_
 
SBuf userKey_
 
dlink_list ip_list
 

Detailed Description

This is the main user related structure. It stores user-related data, and is persistent across requests. It can even persist across multiple external authentications. One major benefit of preserving this structure is the cached ACL match results. This structure, is private to the authentication framework.

Definition at line 36 of file User.h.

Member Typedef Documentation

Definition at line 39 of file User.h.

Constructor & Destructor Documentation

Auth::User::User ( Auth::SchemeConfig aConfig,
const char *  requestRealm 
)
protected

Definition at line 24 of file User.cc.

References debugs, dlink_list::head, HERE(), ip_list, NULL, proxy_match_cache, and dlink_list::tail.

Auth::User::~User ( )
virtual

Definition at line 121 of file User.cc.

References aclCacheMatchFlush(), assert, Auth::AUTH_UNKNOWN, debugs, HERE(), and xfree.

Member Function Documentation

void Auth::User::absorb ( Auth::User::Pointer  from)

Combine two user structs. ONLY to be called from within a scheme module. The scheme module is responsible for ensuring that the two users can be merged without invalidating all the request scheme data. The scheme is also responsible for merging any user related scheme data itself. The caller is responsible for altering all refcount pointers to the 'from' object. They are invalid once this method is complete.

Definition at line 60 of file User.cc.

References assert, dlink_node::data, debugs, dlinkAddTail(), dlinkDelete(), dlink_list::head, HERE(), AuthUserIP::ip_expiretime, ip_list, AuthUserIP::ipaddr, ipcount, max(), dlink_node::next, AuthUserIP::node, notes, NULL, and squid_curtime.

virtual void Auth::User::addToNameCache ( )
pure virtual
SBuf Auth::User::BuildUserKey ( const char *  username,
const char *  realm 
)
static

Definition at line 230 of file User.cc.

References SBuf::append(), key, and SBuf::Printf().

static CbcPointer<Auth::CredentialsCache> Auth::User::Cache ( )
static
void Auth::User::clearIp ( )

Definition at line 140 of file User.cc.

References assert, dlinkDelete(), dlink_node::next, and AuthUserIP::node.

Auth::CredentialState Auth::User::credentials ( ) const

Definition at line 39 of file User.cc.

void Auth::User::credentials ( CredentialState  newCreds)

Definition at line 45 of file User.cc.

void Auth::User::CredentialsCacheStats ( StoreEntry output)
static
void Auth::User::removeIp ( Ip::Address  ipaddr)
virtual int32_t Auth::User::ttl ( ) const
pure virtual

How long these credentials are still valid for. Negative numbers means already expired.

const SBuf Auth::User::userKey ( ) const
inline

Definition at line 66 of file User.h.

References userKey_.

char const* Auth::User::username ( ) const
inline

Definition at line 62 of file User.h.

References username_.

void Auth::User::username ( char const *  aString)

Definition at line 268 of file User.cc.

References assert, NULL, safe_free, and xstrdup.

Member Data Documentation

Auth::Type Auth::User::auth_type
Deprecated:
this determines what scheme owns the user data.

Definition at line 48 of file User.h.

Auth::SchemeConfig* Auth::User::config

the config for this user

Definition at line 50 of file User.h.

Referenced by Auth::UserRequest::AddReplyAuthHeader(), and Auth::UserRequest::authenticate().

CredentialState Auth::User::credentials_state
private

The current state these credentials are in: Unchecked Authenticated Pending helper result Handshake happening in stateful auth. Failed auth

Definition at line 99 of file User.h.

long Auth::User::expiretime

Definition at line 53 of file User.h.

dlink_list Auth::User::ip_list
private

what ip addresses has this user been seen at?, plus a list length cache

Definition at line 121 of file User.h.

Referenced by absorb(), and User().

size_t Auth::User::ipcount

Definition at line 52 of file User.h.

Referenced by absorb().

NotePairs Auth::User::notes

Definition at line 56 of file User.h.

Referenced by absorb().

dlink_list Auth::User::proxy_match_cache

Definition at line 51 of file User.h.

Referenced by User().

SBuf Auth::User::requestRealm_
private

A realm for the user depending on request, designed to identify users, with the same username and different authentication domains.

Definition at line 113 of file User.h.

SBuf Auth::User::userKey_
private

A Unique key for the user, consist by username and requestRealm_

Definition at line 118 of file User.h.

Referenced by userKey().

const char* Auth::User::username_
private

DPW 2007-05-08 The username_ memory will be allocated via xstrdup(). It is our responsibility.

Definition at line 107 of file User.h.

Referenced by username().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors