MIDAS
Loading...
Searching...
No Matches
Auth Class Reference
Collaboration diagram for Auth:

Public Member Functions

int Init ()
 

Public Attributes

std::string realm
 
std::string passwd_filename
 
std::vector< AuthEntrypasswords
 

Detailed Description

Definition at line 13722 of file mhttpd.cxx.

Member Function Documentation

◆ Init()

int Auth::Init ( )

Definition at line 13733 of file mhttpd.cxx.

13734{
13735 std::string exptname = cm_get_experiment_name();
13736
13737 if (!exptname.empty())
13738 realm = exptname;
13739 else
13740 realm = "midas";
13741
13742 bool ok = read_passwords(this);
13743 if (!ok) {
13744 cm_msg(MERROR, "mongoose", "mongoose web server password file \"%s\" has no passwords for realm \"%s\"", passwd_filename.c_str(), realm.c_str());
13745 cm_msg(MERROR, "mongoose", "please add passwords by running: htdigest %s %s midas", passwd_filename.c_str(), realm.c_str());
13746 return SS_FILE_ERROR;
13747 }
13748
13749 return SUCCESS;
13750}
std::string passwd_filename
Definition mhttpd.cxx:13725
std::string realm
Definition mhttpd.cxx:13724
std::string cm_get_experiment_name()
Definition midas.cxx:1580
#define SS_FILE_ERROR
Definition midas.h:669
#define SUCCESS
Definition mcstd.h:54
#define MERROR
Definition midas.h:559
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
Definition midas.cxx:915
static bool read_passwords(Auth *auth)
Definition mhttpd.cxx:13796
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Here is the call graph for this function:

Member Data Documentation

◆ passwd_filename

std::string Auth::passwd_filename

Definition at line 13725 of file mhttpd.cxx.

◆ passwords

std::vector<AuthEntry> Auth::passwords

Definition at line 13726 of file mhttpd.cxx.

◆ realm

std::string Auth::realm

Definition at line 13724 of file mhttpd.cxx.


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