1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

changed credentials API

This commit is contained in:
Falk Werner
2020-02-25 22:05:48 +01:00
parent 767bafcd01
commit c6ca2e14bd
12 changed files with 140 additions and 66 deletions

View File

@@ -45,13 +45,6 @@ public:
wfp_client_config_dispose(config);
}
void SetUsernameCredentials(
std::string const & username,
std::string const & password)
{
wfp_client_config_set_username_credentials(config, username.c_str(), password.c_str());
}
void Connect()
{
wfp_client_protocol_connect(protocol, server->getContext(), "ws://localhost:54321/");
@@ -169,7 +162,7 @@ TEST(client_protocol, connect_with_username_authentication)
{
MockProviderClient provider;
ClientProtocolFixture fixture(provider);
fixture.SetUsernameCredentials("bob", "secret");
// ToDo: enable authentication
EXPECT_CALL(provider, OnConnected()).Times(AtMost(1));
EXPECT_CALL(provider, OnDisconnected()).Times(1);