TAuthenticate


class description - source file - inheritance tree

class TAuthenticate : public TObject


    public:
TAuthenticate TAuthenticate(TSocket* sock, const char* remote, const char* proto, Int_t security) TAuthenticate TAuthenticate(TAuthenticate&) virtual void ~TAuthenticate() Bool_t Authenticate() static void AuthError(const char* where, Int_t error) Bool_t CheckNetrc(TString& user, TString& passwd) static TClass* Class() static const char* GetGlobalPasswd() const static const char* GetGlobalUser() const const char* GetPasswd() const const char* GetUser() const virtual TClass* IsA() const static char* PromptPasswd(const char* prompt = Password: ) static char* PromptUser(const char* remote) static void SetGlobalPasswd(const char* passwd) static void SetGlobalUser(const char* user) static void SetSecureAuthHook(SecureAuth_t func) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

private:
TString fUser user to be authenticated TString fPasswd user's password TString fProtocol remote service (rootd, proofd) TString fRemote remote host to which we want to connect TSocket* fSocket connection to remote daemon TAuthenticate::ESecurity fSecurity logon security level static TString fgUser static TString fgPasswd static SecureAuth_t fgSecAuthHook public:
static const TAuthenticate::ESecurity kNormal static const TAuthenticate::ESecurity kSRP

Class Description

                                                                      
 TAuthenticate                                                        
                                                                      
 An authentication module for ROOT based network services, like rootd 
 and proofd.                                                          
                                                                      


TAuthenticate(TSocket *sock, const char *remote, const char *proto, Int_t security)
 Create authentication object.

Bool_t Authenticate()
 Authenticate to remote rootd or proofd server. Return kTRUE if
 authentication succeeded.

Bool_t CheckNetrc(TString &user, TString &passwd)
 Try to get user name and passwd from the ~/.rootnetrc or
 ~/.netrc files. First ~/.rootnetrc is tried, after that ~/.netrc.
 These files will only be used when their access masks are 0600.
 Returns kTRUE if user and passwd were found for the machine
 specified in the URL. If kFALSE, user and passwd are "".
 The format of these files are:

 # this is a comment line
 machine <machine fqdn> login <user> password <passwd>

 and in addition ~/.rootnetrc also supports:

 secure <machine fqdn> login <user> password <passwd>

 for the secure protocols. All lines must start in the first column.

const char* GetGlobalUser()
 Static method returning the global user.

const char* GetGlobalPasswd()
 Static method returning the global global password.

char* PromptUser(const char *remote)
 Static method to prompt for the user name to be used for authentication
 to rootd or proofd. User is asked to type user name.
 Returns user name (which must be deleted by caller) or 0.

char* PromptPasswd(const char *prompt)
 Static method to prompt for the user's passwd to be used for
 authentication to rootd or proofd. Uses non-echoing command line
 to get passwd. Returns passwd (which must de deleted by caller) or 0.

void AuthError(const char *where, Int_t err)
 Print error string depending on error code.

void SetGlobalUser(const char *user)
 Set global user name to be used for authentication to rootd or proofd.

void SetGlobalPasswd(const char *passwd)
 Set global passwd to be used for authentication to rootd or proofd.

void SetSecureAuthHook(SecureAuth_t func)
 Set secure authorization function. Automatically called when libSRPAuth
 is loaded.



Inline Functions


          const char* GetUser() const
          const char* GetPasswd() const
              TClass* Class()
              TClass* IsA() const
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
                 void StreamerNVirtual(TBuffer& b)
        TAuthenticate TAuthenticate(TAuthenticate&)
                 void ~TAuthenticate()


Author: Fons Rademakers 26/11/2000
Last update: root/net:$Name: $:$Id: TAuthenticate.cxx,v 1.5 2000/12/19 14:32:44 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - 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.