Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestWebServerAuth Class Reference

Web server requiring authentication, with the credentials held by the password manager rather than being part of the requested url. More...

Inheritance diagram for TestWebServerAuth:
TestWebServer TestWebServerAuthHelper

Protected Member Functions

std::string GetServerUsername () const override
 Credentials the test web server requires. Empty means no authentication.
 
std::string GetServerPassword () const override
 
void SetUp () override
 
void TearDown () override
 
- Protected Member Functions inherited from TestWebServer
 TestWebServer ()
 
 ~TestWebServer () override=default
 
void SetUp () override
 
void TearDown () override
 
void SetupMediaSources ()
 
void TearDownMediaSources ()
 
std::string GetUrl (const std::string &path)
 
std::string GetUrlOfTestFile (const std::string &testFile)
 
bool GetLastModifiedOfTestFile (const std::string &testFile, CDateTime &lastModified)
 
void CheckHtmlTestFileResponse (const CCurlFile &curl)
 
void CheckRangesTestFileResponse (const CCurlFile &curl, int httpStatus=MHD_HTTP_OK, bool empty=false)
 
void CheckRangesTestFileResponse (const CCurlFile &curl, const std::string &result, const CHttpRanges &ranges)
 
std::string GenerateRangeHeaderValue (unsigned int start, unsigned int end)
 

Additional Inherited Members

- Protected Attributes inherited from TestWebServer
CWebServer webserver
 
CHTTPJsonRpcHandler m_jsonRpcHandler
 
CHTTPVfsHandler m_vfsHandler
 
std::string baseUrl
 
std::string sourcePath
 
uint16_t webserverPort
 

Detailed Description

Web server requiring authentication, with the credentials held by the password manager rather than being part of the requested url.

This is what adding a source with a username/password gives us: sources.xml holds the plain url and passwords.xml holds the credentials, so every request has to pick them up from CPasswordManager. Anything talking to the server directly instead of going through CFile has to apply them itself, which is what these tests cover.

Member Function Documentation

◆ GetServerPassword()

std::string TestWebServerAuth::GetServerPassword ( ) const
inlineoverrideprotectedvirtual

Reimplemented from TestWebServer.

◆ GetServerUsername()

std::string TestWebServerAuth::GetServerUsername ( ) const
inlineoverrideprotectedvirtual

Credentials the test web server requires. Empty means no authentication.

Reimplemented from TestWebServer.

◆ SetUp()

void TestWebServerAuth::SetUp ( )
inlineoverrideprotected

◆ TearDown()

void TestWebServerAuth::TearDown ( )
inlineoverrideprotected

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