From e2f5b04ff11a6590b43f63cb98523d73cfad7328 Mon Sep 17 00:00:00 2001 From: Simon Goller Date: Wed, 5 Jun 2024 21:21:42 +0200 Subject: [PATCH] Improve feature management By default, it will build with the dev-setup where authenticated user will be faked since there is no login page on the local dev setup. In order to compile it with oidc, disable default features and enable the oidc feature. --- app/Cargo.toml | 9 +++++---- dao/Cargo.toml | 1 + dao_impl/Cargo.toml | 1 + rest/Cargo.toml | 1 + service/Cargo.toml | 1 + service_impl/Cargo.toml | 1 + 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/Cargo.toml b/app/Cargo.toml index 692bde3..6933a9b 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -2,15 +2,16 @@ name = "app" version = "0.1.0" edition = "2021" +resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -#default = ["mock_auth"] +default = ["mock_auth"] #default = ["oidc"] -default = [] -oidc = [] -mock_auth = [] +#default = [] +oidc = ["rest/oidc"] +mock_auth = ["rest/mock_auth"] [dependencies.rest] path = "../rest" diff --git a/dao/Cargo.toml b/dao/Cargo.toml index 83b96d6..412372a 100644 --- a/dao/Cargo.toml +++ b/dao/Cargo.toml @@ -2,6 +2,7 @@ name = "dao" version = "0.1.0" edition = "2021" +resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/dao_impl/Cargo.toml b/dao_impl/Cargo.toml index aa63399..d6807d9 100644 --- a/dao_impl/Cargo.toml +++ b/dao_impl/Cargo.toml @@ -2,6 +2,7 @@ name = "dao_impl" version = "0.1.0" edition = "2021" +resolver = "2" [dependencies] async-trait = "0.1.80" diff --git a/rest/Cargo.toml b/rest/Cargo.toml index 1783e40..99234f0 100644 --- a/rest/Cargo.toml +++ b/rest/Cargo.toml @@ -2,6 +2,7 @@ name = "rest" version = "0.1.0" edition = "2021" +resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] diff --git a/service/Cargo.toml b/service/Cargo.toml index 8aa6df3..d1457f1 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -2,6 +2,7 @@ name = "service" version = "0.1.0" edition = "2021" +resolver = "2" [dependencies] async-trait = "0.1.80" diff --git a/service_impl/Cargo.toml b/service_impl/Cargo.toml index 3dee49f..64c9b19 100644 --- a/service_impl/Cargo.toml +++ b/service_impl/Cargo.toml @@ -2,6 +2,7 @@ name = "service_impl" version = "0.1.0" edition = "2021" +resolver = "2" [dependencies] async-trait = "0.1.80"