Skip to content

Commit

Permalink
#feature - #[cfg(feature = "mssql-integrated-auth")]
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRustifyer committed Apr 13, 2023
1 parent 61a854a commit 73db136
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions canyon_connection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ lazy_static = "1.4.0"
serde = { version = "1.0.138", features = ["derive"] }
toml = "0.7.3"

[features]
mssql-integrated-auth = []

1 change: 1 addition & 0 deletions canyon_connection/src/canyon_database_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl DatabaseConnection {
crate::datasources::SqlServerAuth::Basic { username, password } => {
AuthMethod::sql_server(username, password)
}
#[cfg(feature = "mssql-integrated-auth")]
crate::datasources::SqlServerAuth::Integrated => AuthMethod::Integrated,
},
});
Expand Down
1 change: 1 addition & 0 deletions canyon_connection/src/datasources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ pub enum PostgresAuth {
pub enum SqlServerAuth {
#[serde(alias = "Basic", alias = "basic")]
Basic { username: String, password: String },
#[cfg(feature = "mssql-integrated-auth")]
#[serde(alias = "Integrated", alias = "integrated")]
Integrated,
}
Expand Down

0 comments on commit 73db136

Please sign in to comment.