library: libCore
#include "THostAuth.h"

THostAuth


class description - source file - inheritance tree (.pdf)

class THostAuth : public TObject

Inheritance Chart:
TObject
<-
THostAuth
    private:
void Create(const char* host, const char* user, Int_t nmeth = 0, Int_t* authmeth = 0, char** details = "0") public:
THostAuth(const char* host, const char* user, Int_t nmeth = 0, Int_t* authmeth = 0, char** details = "0") THostAuth(const char* host, Int_t server, const char* user, Int_t nmeth = 0, Int_t* authmeth = 0, char** details = "0") THostAuth(const char* host, const char* user, Int_t authmeth, const char* details) THostAuth(const char* host, Int_t server, const char* user, Int_t authmeth, const char* details) THostAuth(const char* asstring) THostAuth(THostAuth& ha) virtual ~THostAuth() void Activate() void AddFirst(Int_t level, const char* details = "0") void AddMethod(Int_t level, const char* details = "0") void AsString(TString& out) static TClass* Class() void CountFailure(Int_t level) void CountSuccess(Int_t level) TSecContext* CreateSecContext(const char* user, const char* host, Int_t meth, Int_t offset, const char* details, const char* token, TDatime expdate = kROOTTZERO, void* ctx = 0, Int_t key = -1) void DeActivate() TList* Established() const const char* GetDetails(Int_t level) const const char* GetDetailsByIdx(Int_t idx) const Int_t GetFailure(Int_t idx) const const char* GetHost() const Int_t GetMethod(Int_t idx) const Int_t GetServer() const Int_t GetSuccess(Int_t idx) const const char* GetUser() const Bool_t HasMethod(Int_t level, Int_t* pos = 0) virtual TClass* IsA() const Bool_t IsActive() const Int_t NumMethods() const THostAuth& operator=(const THostAuth&) virtual void Print(Option_t* option) const void PrintEstablished() const void RemoveMethod(Int_t level) void ReOrder(Int_t nmet, Int_t* fmet) void Reset() void SetDetails(Int_t level, const char* details) void SetEstablished(TList* nl) void SetFirst(Int_t level) void SetHost(const char* host) void SetServer(Int_t server) void SetUser(const char* user) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void Update(THostAuth* ha)

Data Members

    private:
TString fHost Host Char_t fServer Server (kSOCKD,kROOTD,kPROOFD) TString fUser Username Int_t fNumMethods Number of AuthMethods Int_t fMethods[6] AuthMethods TString fDetails[6] AuthDetails Int_t fSuccess[6] Statistics of successful attempts / per method Int_t fFailure[6] Statistics of failed attempts / per method Bool_t fActive Flag used in cleaning/reset TList* fSecContexts List of TSecContexts related to this THostAuth

Class Description

                                                                      
 THostAuth                                                            
                                                                      
 Contains details about host-specific authentication methods and the  
 result of their application.                                         
 Used by TAuthenticate.                                               
                                                                      


THostAuth(const char *host, const char *user, Int_t nmeth, Int_t *authmeth, char **details) : TObject()
 Create hostauth object.
 'host' may contain also the server for whicb these directives
 are valid in the form 'host:server' or 'server://host'
 with server either "sock[d]", "root[d]", "proof[d]" or
 0, 1, 2, respectively.

THostAuth(const char *host, Int_t server, const char *user, Int_t nmeth, Int_t *authmeth, char **details) : TObject()
 Create hostauth object.
 'host' may contain also the server for whicb these directives
 are valid in the form 'host:server' or 'server://host'
 with server either "sock[d]", "root[d]", "proof[d]" or
 0, 1, 2, respectively.

THostAuth(const char *host, const char *user, Int_t authmeth, const char *details) : TObject()
 Create hostauth object with one method only.
 'host' may contain also the server for whicb these directives
 are valid in the form 'host:server' or 'server://host'

THostAuth(const char *host, Int_t server, const char *user, Int_t authmeth, const char *details) : TObject()
 Create hostauth object with one method only.
 'host' may contain also the server for whicb these directives
 are valid in the form 'host:server' or 'server://host'

void Create(const char *host, const char *user, Int_t nmeth, Int_t *authmeth, char **details)
 Create hostauth object.
 'host' may contain also the server for whicb these directives
 are valid in the form 'host:server' or 'server://host'
 with server either "sock[d]", "root[d]", "proof[d]" or
 0, 1, 2, respectively.

THostAuth(const char *asstring) : TObject()
 Create hostauth object from directives given as a compact string
 See THostAuth::AsString().
 Used in proof context only; fServer not set; to be set by hand
 with SetServer() method if really needed

THostAuth(THostAuth &ha) : TObject()
 Copy ctor ...

void AddMethod(Int_t meth, const char *details)
 Add method to the list. If already there, change its
 details to 'details'

void RemoveMethod(Int_t meth)
 Remove method 'meth' from the list, if there ...

void Reset()
 Remove all methods, leaving Active status and
 list of associted TSceContexts unchanged

~THostAuth()
 The dtor.

const char* GetDetails(Int_t level)
 Return authentication details for specified level
 or "" if the specified level does not exist for this host.

Bool_t HasMethod(Int_t level, Int_t *pos)
 Return kTRUE if method 'level' is in the list

void SetDetails(Int_t level, const char *details)
 Set authentication details for specified level.

void Print(Option_t *proc) const
 Print object content.

void PrintEstablished() const
 Print info about established authentication vis-a-vis of this Host.

void ReOrder(Int_t nmet, Int_t *fmet)
 Reorder nmet methods according fmet[nmet]

void Update(THostAuth *ha)
 Update info with the one in ha
 Remaining methods, if any, get lower priority

void SetFirst(Int_t method)
 Set 'method' to be the first used (if in the list ...).

void AddFirst(Int_t level, const char *details)
 Add new method in first position
 If already in the list, set as first method 'level' with
 authentication 'details'.
 Faster then AddMethod(method,details)+SetFirst(method).

void CountSuccess(Int_t method)
 Count successes for 'method'

void CountFailure(Int_t method)
 Count failures for 'method'

TSecContext* CreateSecContext(const char *user, const char *host, Int_t meth, Int_t offset, const char *details, const char *token, TDatime expdate, void *sctx, Int_t key)
 Create a Security context and add it to local list
 Return pointer to it to be stored in TAuthenticate

void AsString(TString &Out)
 Return a static string with all info in a serialized form



Inline Functions


              Int_t NumMethods() const
              Int_t GetMethod(Int_t idx) const
              Int_t GetFailure(Int_t idx) const
              Int_t GetSuccess(Int_t idx) const
             Bool_t IsActive() const
               void DeActivate()
               void Activate()
        const char* GetDetailsByIdx(Int_t idx) const
        const char* GetHost() const
              Int_t GetServer() const
        const char* GetUser() const
               void SetHost(const char* host)
               void SetServer(Int_t server)
               void SetUser(const char* user)
             TList* Established() const
               void SetEstablished(TList* nl)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
         THostAuth& operator=(const THostAuth&)


Author: G. Ganis 19/03/2003
Last update: root/net:$Name: $:$Id: THostAuth.cxx,v 1.6 2004/02/19 00:11:18 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.