libzypp 17.37.17
zypp::media::AuthData Class Reference

Class for handling media authentication data. More...

#include <zypp-media/auth/authdata.h>

Inheritance diagram for zypp::media::AuthData:

Public Member Functions

 AuthData ()
 AuthData (const Url &url)
 AuthData (std::string username, std::string password)
virtual ~AuthData ()
virtual bool valid () const
 Checks validity of authentication data.
void setUrl (const Url &url)
void setUsername (const std::string &username)
void setPassword (const std::string &password)
Url url () const
std::string username () const
std::string password () const
time_t lastDatabaseUpdate () const
void setLastDatabaseUpdate (time_t time)
const std::map< std::string, std::string > & extraValues () const
std::map< std::string, std::string > & extraValues ()
virtual std::ostream & dumpOn (std::ostream &str) const
virtual std::ostream & dumpAsIniOn (std::ostream &str) const

Private Attributes

Url _url
std::string _username
std::string _password
time_t _lastChange
std::map< std::string, std::string > _extraValues

Detailed Description

Class for handling media authentication data.

This is the most generic class containing only username and password members.

Definition at line 30 of file authdata.h.

Constructor & Destructor Documentation

◆ AuthData() [1/3]

zypp::media::AuthData::AuthData ( )
inline

Definition at line 33 of file authdata.h.

◆ AuthData() [2/3]

zypp::media::AuthData::AuthData ( const Url & url)

Definition at line 22 of file authdata.cc.

◆ AuthData() [3/3]

zypp::media::AuthData::AuthData ( std::string username,
std::string password )
inline

Definition at line 38 of file authdata.h.

◆ ~AuthData()

virtual zypp::media::AuthData::~AuthData ( )
inlinevirtual

Definition at line 42 of file authdata.h.

Member Function Documentation

◆ valid()

bool zypp::media::AuthData::valid ( ) const
virtual

Checks validity of authentication data.

Returns
true if the object contains non-empty username and non-empty password, false otherwise.

Reimplemented in zypp::media::CurlAuthData.

Definition at line 30 of file authdata.cc.

◆ setUrl()

void zypp::media::AuthData::setUrl ( const Url & url)
inline

Definition at line 51 of file authdata.h.

◆ setUsername()

void zypp::media::AuthData::setUsername ( const std::string & username)
inline

Definition at line 52 of file authdata.h.

◆ setPassword()

void zypp::media::AuthData::setPassword ( const std::string & password)
inline

Definition at line 53 of file authdata.h.

◆ url()

Url zypp::media::AuthData::url ( ) const
inline

Definition at line 55 of file authdata.h.

◆ username()

std::string zypp::media::AuthData::username ( ) const
inline

Definition at line 56 of file authdata.h.

◆ password()

std::string zypp::media::AuthData::password ( ) const
inline

Definition at line 57 of file authdata.h.

◆ lastDatabaseUpdate()

time_t zypp::media::AuthData::lastDatabaseUpdate ( ) const

Returns the timestamp of the last change to the database this credential is stored in, or 0 if it is not known.

Definition at line 35 of file authdata.cc.

◆ setLastDatabaseUpdate()

void zypp::media::AuthData::setLastDatabaseUpdate ( time_t time)

Definition at line 40 of file authdata.cc.

◆ extraValues() [1/2]

const std::map< std::string, std::string > & zypp::media::AuthData::extraValues ( ) const

Definition at line 45 of file authdata.cc.

◆ extraValues() [2/2]

std::map< std::string, std::string > & zypp::media::AuthData::extraValues ( )

Definition at line 50 of file authdata.cc.

◆ dumpOn()

std::ostream & zypp::media::AuthData::dumpOn ( std::ostream & str) const
virtual

Reimplemented in zypp::media::CurlAuthData.

Definition at line 55 of file authdata.cc.

◆ dumpAsIniOn()

std::ostream & zypp::media::AuthData::dumpAsIniOn ( std::ostream & str) const
virtual

Definition at line 66 of file authdata.cc.

Member Data Documentation

◆ _url

Url zypp::media::AuthData::_url
private

Definition at line 74 of file authdata.h.

◆ _username

std::string zypp::media::AuthData::_username
private

Definition at line 75 of file authdata.h.

◆ _password

std::string zypp::media::AuthData::_password
private

Definition at line 76 of file authdata.h.

◆ _lastChange

time_t zypp::media::AuthData::_lastChange
private

Definition at line 77 of file authdata.h.

◆ _extraValues

std::map<std::string, std::string> zypp::media::AuthData::_extraValues
private

Definition at line 78 of file authdata.h.


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