bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
http::CredentialsManager Class Reference
Collaboration diagram for http::CredentialsManager:
Collaboration graph

Public Member Functions

void add (const std::string &url, AccessCredentials *ac)
 
void clear ()
 
AccessCredentialsget (const std::shared_ptr< http::url > &url)
 
AccessCredentialsget (const std::string &url)
 
bool hasNgapS3Credentials () const
 
size_t size () const
 

Static Public Member Functions

static CredentialsManagertheCM ()
 Returns the singleton instance of the CredentialsManager.
 

Static Public Attributes

static const char * ENV_ACCESS_KEY = "CMAC_ACCESS_KEY"
 
static const char * ENV_ID_KEY = "CMAC_ID"
 
static const char * ENV_REGION_KEY = "CMAC_REGION"
 
static const char * ENV_URL_KEY = "CMAC_URL"
 
static CredentialsManagertheMngr = nullptr
 Our singleton instance.
 
static const char * USE_ENV_CREDS_KEY_VALUE = "ENV_CREDS"
 

Friends

class CredentialsManagerTest
 
class CurlUtilsTest
 

Detailed Description

Definition at line 42 of file CredentialsManager.h.

Constructor & Destructor Documentation

◆ ~CredentialsManager()

http::CredentialsManager::~CredentialsManager ( )

Definition at line 114 of file CredentialsManager.cc.

Member Function Documentation

◆ add()

void http::CredentialsManager::add ( const std::string & key,
AccessCredentials * ac )

Add the passed set of AccessCredentials to the collection, filed under key.

Parameters
keyThe key (URL) to associated with these credentials
acThe credentials to use for access.

Definition at line 135 of file CredentialsManager.cc.

◆ clear()

void http::CredentialsManager::clear ( )
inline

Definition at line 77 of file CredentialsManager.h.

◆ get() [1/2]

AccessCredentials * http::CredentialsManager::get ( const std::shared_ptr< http::url > & url)

Retrieve the AccessCredentials, if any, associated with the passed url (key).

Parameters
urlThe URL for which AccessCredentials are desired
Returns
If there are AccessCredentials associated with the URL/key then a pointer to them will be returned. Otherwise, NULL.

Definition at line 152 of file CredentialsManager.cc.

◆ get() [2/2]

AccessCredentials * http::CredentialsManager::get ( const std::string & url)

Definition at line 175 of file CredentialsManager.cc.

◆ hasNgapS3Credentials()

bool http::CredentialsManager::hasNgapS3Credentials ( ) const
inline

Definition at line 89 of file CredentialsManager.h.

◆ size()

size_t http::CredentialsManager::size ( ) const
inline

Definition at line 85 of file CredentialsManager.h.

◆ theCM()

CredentialsManager * http::CredentialsManager::theCM ( )
static

Returns the singleton instance of the CredentialsManager.

Returns
Returns the singleton instance of the CredentialsManager

Definition at line 101 of file CredentialsManager.cc.

Friends And Related Symbol Documentation

◆ CredentialsManagerTest

friend class CredentialsManagerTest
friend

Definition at line 65 of file CredentialsManager.h.

◆ CurlUtilsTest

friend class CurlUtilsTest
friend

Definition at line 66 of file CredentialsManager.h.

Member Data Documentation

◆ ENV_ACCESS_KEY

const char * http::CredentialsManager::ENV_ACCESS_KEY = "CMAC_ACCESS_KEY"
static

Definition at line 45 of file CredentialsManager.h.

◆ ENV_ID_KEY

const char * http::CredentialsManager::ENV_ID_KEY = "CMAC_ID"
static

Definition at line 44 of file CredentialsManager.h.

◆ ENV_REGION_KEY

const char * http::CredentialsManager::ENV_REGION_KEY = "CMAC_REGION"
static

Definition at line 46 of file CredentialsManager.h.

◆ ENV_URL_KEY

const char * http::CredentialsManager::ENV_URL_KEY = "CMAC_URL"
static

Definition at line 47 of file CredentialsManager.h.

◆ theMngr

CredentialsManager * http::CredentialsManager::theMngr = nullptr
static

Our singleton instance.

Definition at line 69 of file CredentialsManager.h.

◆ USE_ENV_CREDS_KEY_VALUE

const char * http::CredentialsManager::USE_ENV_CREDS_KEY_VALUE = "ENV_CREDS"
static

Definition at line 48 of file CredentialsManager.h.


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