libzypp  17.28.8
zypp::media::AuthData Class Reference

Class for handling media authentication data. More...

#include <media/MediaUserAuth.h>

Inheritance diagram for zypp::media::AuthData:

Public Member Functions

 AuthData ()
 AuthData (const Url &url)
 AuthData (const std::string &username, const std::string &password)
virtual ~AuthData ()
virtual bool valid () const
 Checks validity of authentication data. More...
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)
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

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 MediaUserAuth.h.

Constructor & Destructor Documentation

◆ AuthData() [1/3]

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

Definition at line 33 of file MediaUserAuth.h.

◆ AuthData() [2/3]

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

Definition at line 28 of file

◆ AuthData() [3/3]

zypp::media::AuthData::AuthData ( const std::string &  username,
const std::string &  password 

Definition at line 38 of file MediaUserAuth.h.

◆ ~AuthData()

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

Definition at line 42 of file MediaUserAuth.h.

Member Function Documentation

◆ valid()

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

Checks validity of authentication data.

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

Reimplemented in zypp::media::CurlAuthData.

Definition at line 36 of file

◆ setUrl()

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

Definition at line 51 of file MediaUserAuth.h.

◆ setUsername()

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

Definition at line 52 of file MediaUserAuth.h.

◆ setPassword()

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

Definition at line 53 of file MediaUserAuth.h.

◆ url()

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

Definition at line 55 of file MediaUserAuth.h.

◆ username()

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

Definition at line 56 of file MediaUserAuth.h.

◆ password()

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

Definition at line 57 of file MediaUserAuth.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 its not known.

Definition at line 41 of file

◆ setLastDatabaseUpdate()

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

Definition at line 46 of file

◆ dumpOn()

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

Reimplemented in zypp::media::CurlAuthData.

Definition at line 51 of file

◆ dumpAsIniOn()

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

Definition at line 62 of file

Member Data Documentation

◆ _url

Url zypp::media::AuthData::_url

Definition at line 71 of file MediaUserAuth.h.

◆ _username

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

Definition at line 72 of file MediaUserAuth.h.

◆ _password

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

Definition at line 73 of file MediaUserAuth.h.

◆ _lastChange

time_t zypp::media::AuthData::_lastChange

Definition at line 74 of file MediaUserAuth.h.

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