CAccessListCheck

Name

CAccessListCheck -- Authenticate against a list of allowed credentials.

Synopsis


#include <AccessListCheck.h>
         
 class CAccessListCheck {

  CAccessListCheck();
   CAccessListCheck(const CAccessListCheck::StringMap& rSourceMap);
  CAccessListCheck(const CAccessListCheck& aCAccessListCheck);

  ~CAccessListCheck();

  CAccessListCheck& operator=(const CAccessListCheck& aCAccessListCheck);
  const StringMap getAccessList();
   virtual Bool_t Authenticate(CInteractor& rInteractor);
  virtual void AddAclEntry(const std::string& rEntry);
  virtual void DeleteAclEntry(const std::string& rEntry);
}

Description

The CAccessListCheck class implements authentication against one of a set of legal credentials. This is simlar in nature to the CTclAccessListCheck class, however the list is stored internally in the class rather than in a Tcl variable.

Public member functions

CAccessListCheck();

Constructs an access listchecking authenticator with an empty access control list. The functions AddAclEntry and DeleteAclEntry can be used to maintaint the contents of the access list.

CAccessListCheck(const CAccessListCheck::StringMap& rSourceMap);

Creates an access list checking authenticator. The initial contents of the access control list are rSourceMap. See "Types and public data" below for information about the StringMap data tpe.

CAccessListCheck(const CAccessListCheck& aCAccessListCheck);

Constructs an access list chekcing authenticator. The access list is a copy of the one from aCAccessListCheck

~CAccessListCheck();

Releases any storage or resources that were allocated by the object.

CAccessListCheck& operator=(const CAccessListCheck& aCAccessListCheck);

Assigns the current access list authenticator from aCAccessListCheck

const CAccessListCheck::StringMap getAccessList();

Returns a copy of the current access list. See "Types and public data" below for a description of the StringMap data type.

virtual Bool_t Authenticate(CInteractor& rInteractor);

Obtains the credentials string from the rInteractor and determines if there is match for it in the current access control list. If there is, kfTRUE is returned. If not, kfFALSE is returned.

virtual void AddAclEntry(const std::string& rEntry);

Adds an access control entry to he list. This is virtual to allow derived classes to override how this is done. the rEntry string is added to the access control list.

virtual void DeleteAclEntry(const std::string& rEntry);

Removes the access control entry rEntry from the access control list.

Types and public data

CAccessListCheck::StringMap contains the access control list entries. This is a type that is defined in the AccessListCheck.h header as:


class CAccessListCheck  : public CAuthenticator        
{                       
public:
  typedef std::set<std::string> StringMap;
...
};