Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Make all messages serde-serializable.
.type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]")
// Compiling protos using path on build time.
.compile_protos(&["proto/core/proxy.proto"], &["proto/core"])?;
.compile_protos(
&[
"proto/v2/proxy.proto",
"proto/v2/common.proto",
"proto/common/client_types.proto",
],
&["proto"],
)?;

println!("cargo:rerun-if-changed=proto");
Ok(())
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/enterprise/handlers/desktop_client_mfa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ pub(super) async fn mfa_auth_callback(
code: payload.code,
nonce,
state: payload.state,
#[allow(deprecated)]
callback_url: String::new(),
};

debug!("Sending MFA OIDC authenticate request to core service");
Expand Down
2 changes: 0 additions & 2 deletions src/enterprise/handlers/openid_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ async fn auth_callback(
let request = AuthCallbackRequest {
code: payload.code,
nonce,
#[allow(deprecated)]
callback_url: String::new(),
};

let rx = state
Expand Down
24 changes: 23 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,30 @@ pub mod http;
pub mod logging;
mod setup;

pub(crate) mod generated {
pub(crate) mod defguard {
pub(crate) mod proxy {
pub(crate) mod v2 {
tonic::include_proto!("defguard.proxy.v2");
}
}

pub(crate) mod common {
pub(crate) mod v2 {
tonic::include_proto!("defguard.common.v2");
}
}

pub mod client_types {
tonic::include_proto!("defguard.client_types");
}
}
}

pub(crate) mod proto {
tonic::include_proto!("defguard.proxy");
pub(crate) use crate::generated::defguard::client_types::*;
pub(crate) use crate::generated::defguard::common::v2::*;
pub(crate) use crate::generated::defguard::proxy::v2::*;
}

#[macro_use]
Expand Down
Loading