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

allow specification of multiple authenticators

This commit is contained in:
Falk Werner
2020-03-18 19:14:02 +01:00
parent b37e95f724
commit 46ba61e97d
4 changed files with 83 additions and 55 deletions

View File

@@ -268,10 +268,12 @@ TEST(config, authentication)
char const config_text[] =
"version = { major = 1, minor = 0 }\n"
"authentication:\n"
"{\n"
" provider = \"test\"\n"
" settings: { }\n"
"}\n"
"(\n"
" {\n"
" provider = \"test\"\n"
" settings: { }\n"
" }\n"
")\n"
;
bool result = wfd_config_load_string(builder.getBuilder(), config_text);
ASSERT_TRUE(result);
@@ -289,10 +291,12 @@ TEST(config, failed_create_authenticator)
char const config_text[] =
"version = { major = 1, minor = 0 }\n"
"authentication:\n"
"{\n"
" provider = \"test\"\n"
" settings: { }\n"
"}\n"
"(\n"
" {\n"
" provider = \"test\"\n"
" settings: { }\n"
" }\n"
")\n"
;
bool result = wfd_config_load_string(builder.getBuilder(), config_text);
ASSERT_FALSE(result);
@@ -309,9 +313,11 @@ TEST(config, failed_missing_auth_provider)
char const config_text[] =
"version = { major = 1, minor = 0 }\n"
"authentication:\n"
"{\n"
" settings: { }\n"
"}\n"
"(\n"
" {\n"
" settings: { }\n"
" }\n"
")\n"
;
bool result = wfd_config_load_string(builder.getBuilder(), config_text);
ASSERT_FALSE(result);
@@ -328,9 +334,11 @@ TEST(config, failed_missing_auth_settings)
char const config_text[] =
"version = { major = 1, minor = 0 }\n"
"authentication:\n"
"{\n"
" provider = \"test\"\n"
"}\n"
"(\n"
" {\n"
" provider = \"test\"\n"
" }\n"
")\n"
;
bool result = wfd_config_load_string(builder.getBuilder(), config_text);
ASSERT_FALSE(result);