CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
cond::auth::DecodingKey Class Reference

#include <DecodingKey.h>

Public Member Functions

void addDefaultService (const std::string &connectionString)
 
void addService (const std::string &serviceName, const std::string &connectionString, const std::string &userName, const std::string &password)
 
size_t createFromInputFile (const std::string &inputFileName, size_t generatedKeySize=0)
 
 DecodingKey ()
 
void flush ()
 
size_t init (const std::string &keyFileName, const std::string &password, bool readMode=true)
 
bool isNominal () const
 
void list (std::ostream &out)
 
const std::string & ownerName () const
 
const std::string & principalKey () const
 
const std::string & principalName () const
 
const std::map< std::string,
ServiceCredentials > & 
services () const
 
virtual ~DecodingKey ()
 

Static Public Member Functions

static std::string templateFile ()
 

Static Public Attributes

static constexpr size_t DEFAULT_KEY_SIZE = 100
 
static constexpr const char *const FILE_NAME = "db.key"
 
static constexpr const char *const FILE_PATH = ".cms_cond/db.key"
 

Private Attributes

std::string m_fileName
 
bool m_mode
 
std::string m_owner
 
std::string m_principalKey
 
std::string m_principalName
 
std::string m_pwd
 
std::map< std::string,
ServiceCredentials
m_services
 

Detailed Description

Definition at line 34 of file DecodingKey.h.

Constructor & Destructor Documentation

cond::auth::DecodingKey::DecodingKey ( )
inline

Definition at line 102 of file DecodingKey.h.

102  :m_fileName(""),m_mode( true ),m_pwd(""),m_principalName(""),m_principalKey(""),m_owner(""),m_services(){
103 }
std::string m_fileName
Definition: DecodingKey.h:75
std::map< std::string, ServiceCredentials > m_services
Definition: DecodingKey.h:87
std::string m_principalName
Definition: DecodingKey.h:81
std::string m_principalKey
Definition: DecodingKey.h:83
virtual cond::auth::DecodingKey::~DecodingKey ( )
inlinevirtual

Definition at line 48 of file DecodingKey.h.

48 {}

Member Function Documentation

void cond::auth::DecodingKey::addDefaultService ( const std::string &  connectionString)

Definition at line 283 of file DecodingKey.cc.

void cond::auth::DecodingKey::addService ( const std::string &  serviceName,
const std::string &  connectionString,
const std::string &  userName,
const std::string &  password 
)

Definition at line 287 of file DecodingKey.cc.

size_t cond::auth::DecodingKey::createFromInputFile ( const std::string &  inputFileName,
size_t  generatedKeySize = 0 
)

Definition at line 186 of file DecodingKey.cc.

void cond::auth::DecodingKey::flush ( )

Definition at line 248 of file DecodingKey.cc.

size_t cond::auth::DecodingKey::init ( const std::string &  keyFileName,
const std::string &  password,
bool  readMode = true 
)

Definition at line 108 of file DecodingKey.cc.

bool cond::auth::DecodingKey::isNominal ( ) const
inline

Definition at line 119 of file DecodingKey.h.

119  {
120  return !m_owner.empty();
121 }
void cond::auth::DecodingKey::list ( std::ostream &  out)

Definition at line 235 of file DecodingKey.cc.

const std::string & cond::auth::DecodingKey::ownerName ( ) const
inline

Definition at line 125 of file DecodingKey.h.

125  {
126  return m_owner;
127 }
const std::string & cond::auth::DecodingKey::principalKey ( ) const
inline

Definition at line 113 of file DecodingKey.h.

113  {
114  return m_principalKey;
115 }
std::string m_principalKey
Definition: DecodingKey.h:83
const std::string & cond::auth::DecodingKey::principalName ( ) const
inline

Definition at line 107 of file DecodingKey.h.

107  {
108  return m_principalName;
109 }
std::string m_principalName
Definition: DecodingKey.h:81
const std::map< std::string, cond::auth::ServiceCredentials > & cond::auth::DecodingKey::services ( ) const
inline

Definition at line 131 of file DecodingKey.h.

131 { return m_services; }
std::map< std::string, ServiceCredentials > m_services
Definition: DecodingKey.h:87
std::string cond::auth::DecodingKey::templateFile ( )
static

Definition at line 96 of file DecodingKey.cc.

Member Data Documentation

constexpr size_t cond::auth::DecodingKey::DEFAULT_KEY_SIZE = 100
static

Definition at line 40 of file DecodingKey.h.

constexpr const char* const cond::auth::DecodingKey::FILE_NAME = "db.key"
static

Definition at line 38 of file DecodingKey.h.

constexpr const char* const cond::auth::DecodingKey::FILE_PATH = ".cms_cond/db.key"
static

Definition at line 39 of file DecodingKey.h.

std::string cond::auth::DecodingKey::m_fileName
private

Definition at line 75 of file DecodingKey.h.

bool cond::auth::DecodingKey::m_mode
private

Definition at line 77 of file DecodingKey.h.

std::string cond::auth::DecodingKey::m_owner
private

Definition at line 85 of file DecodingKey.h.

std::string cond::auth::DecodingKey::m_principalKey
private

Definition at line 83 of file DecodingKey.h.

std::string cond::auth::DecodingKey::m_principalName
private

Definition at line 81 of file DecodingKey.h.

std::string cond::auth::DecodingKey::m_pwd
private

Definition at line 79 of file DecodingKey.h.

std::map< std::string, ServiceCredentials > cond::auth::DecodingKey::m_services
private

Definition at line 87 of file DecodingKey.h.