Enum tiberius::AuthMethod
source · pub enum AuthMethod {
SqlServer(SqlServerAuth),
Windows(WindowsAuth),
Integrated,
AADToken(String),
// some variants omitted
}
Expand description
Defines the method of authentication to the server.
Variants§
SqlServer(SqlServerAuth)
Authenticate directly with SQL Server.
Windows(WindowsAuth)
Available on Windows and crate feature
winauth
only.Authenticate with Windows credentials.
Integrated
Available on Windows, or Unix and crate feature
integrated-auth-gssapi
only.Authenticate as the currently logged in user. On Windows uses SSPI and Kerberos on Unix platforms.
AADToken(String)
Authenticate with an AAD token. The token should encode an AAD user/service principal which has access to SQL Server.
Implementations§
source§impl AuthMethod
impl AuthMethod
sourcepub fn sql_server(user: impl ToString, password: impl ToString) -> Self
pub fn sql_server(user: impl ToString, password: impl ToString) -> Self
Construct a new SQL Server authentication configuration.
Trait Implementations§
source§impl Clone for AuthMethod
impl Clone for AuthMethod
source§fn clone(&self) -> AuthMethod
fn clone(&self) -> AuthMethod
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AuthMethod
impl Debug for AuthMethod
source§impl PartialEq<AuthMethod> for AuthMethod
impl PartialEq<AuthMethod> for AuthMethod
source§fn eq(&self, other: &AuthMethod) -> bool
fn eq(&self, other: &AuthMethod) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.