libzypp 17.37.10

zypp::UrlCredentialExtractor Class Reference

Extract credentials in Url authority and store them via CredentialManager. More...

`#include <zypp/zypp_detail/urlcredentialextractor_p.h>`

## Public Member Functions
| UrlCredentialExtractor (const Pathname &root_r)
| UrlCredentialExtractor (Pathname &root_r)
| ~UrlCredentialExtractor ()
bool | collect (const Url &url_r)
| Remember credentials stored in URL authority leaving the password in url_r.
bool | collect (const OriginEndpoint &url_r)
| Remember credentials stored in OriginEndpoint authority leaving the password in url_r.
template<class TContainer>
bool | collect (const TContainer &urls_r)
bool | extract (Url &url_r)
| Remember credentials stored in URL authority stripping the passowrd from url_r.
template<class TContainer>
bool | extract (TContainer &urls_r)

## Private Attributes
const Pathname & | _root
scoped_ptr< media::CredentialManager > | _cmPtr

## Detailed Description

Extract credentials in Url authority and store them via CredentialManager.

Lazy init CredentialManager and save collected credentials when going out of scope.

Methods return whether a password has been collected/extracted.

UrlCredentialExtractor( "/rootdir" ).collect( oneUrlOrUrlContainer );
zypp::UrlCredentialExtractor::UrlCredentialExtractor
UrlCredentialExtractor(const Pathname &root_r)
Definition urlcredentialextractor_p.h:46
{
UrlCredentialExtractor extractCredentials;
extractCredentials.collect( oneUrlOrUrlContainer );
extractCredentials.extract( oneMoreUrlOrUrlContainer );
....
}
zypp::UrlCredentialExtractor::extract
bool extract(Url &url_r)
Remember credentials stored in URL authority stripping the passowrd from url_r.
Definition urlcredentialextractor_p.h:81
zypp::UrlCredentialExtractor::collect
bool collect(const Url &url_r)
Remember credentials stored in URL authority leaving the password in url_r.
Definition urlcredentialextractor_p.h:58

Definition at line 43 of file urlcredentialextractor_p.h.

## Constructor & Destructor Documentation

## ◆ UrlCredentialExtractor() [1/2]

zypp::UrlCredentialExtractor::UrlCredentialExtractor | ( | const Pathname & | root_r | ) |
| inline

Definition at line 46 of file urlcredentialextractor_p.h.

## ◆ UrlCredentialExtractor() [2/2]

zypp::UrlCredentialExtractor::UrlCredentialExtractor | ( | Pathname & | root_r | ) |
| inline

Definition at line 50 of file urlcredentialextractor_p.h.

## ◆ ~UrlCredentialExtractor()

zypp::UrlCredentialExtractor::~UrlCredentialExtractor | ( |  | ) |
| inline

Definition at line 54 of file urlcredentialextractor_p.h.

## Member Function Documentation

## ◆ collect() [1/3]

bool zypp::UrlCredentialExtractor::collect | ( | const Url & | url_r | ) |
| inline

Remember credentials stored in URL authority leaving the password in url_r.

Definition at line 58 of file urlcredentialextractor_p.h.

## ◆ collect() [2/3]

bool zypp::UrlCredentialExtractor::collect | ( | const OriginEndpoint & | url_r | ) |
| inline

Remember credentials stored in OriginEndpoint authority leaving the password in url_r.

Definition at line 70 of file urlcredentialextractor_p.h.

## ◆ collect() [3/3]

template<class TContainer>

bool zypp::UrlCredentialExtractor::collect | ( | const TContainer & | urls_r | ) |
| inline

Definition at line 77 of file urlcredentialextractor_p.h.

## ◆ extract() [1/2]

bool zypp::UrlCredentialExtractor::extract | ( | Url & | url_r | ) |
| inline

Remember credentials stored in URL authority stripping the passowrd from url_r.

Definition at line 81 of file urlcredentialextractor_p.h.

## ◆ extract() [2/2]

template<class TContainer>

bool zypp::UrlCredentialExtractor::extract | ( | TContainer & | urls_r | ) |
| inline

Definition at line 90 of file urlcredentialextractor_p.h.

## Member Data Documentation

## ◆ _root

const Pathname& zypp::UrlCredentialExtractor::_root
| private

Definition at line 94 of file urlcredentialextractor_p.h.

## ◆ _cmPtr

scoped_ptr<media::CredentialManager> zypp::UrlCredentialExtractor::_cmPtr
| private

Definition at line 95 of file urlcredentialextractor_p.h.

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

- zypp/zypp_detail/urlcredentialextractor_p.h