Struct azure_identity::EnvironmentCredential
source · pub struct EnvironmentCredential { /* private fields */ }
Expand description
Enables authentication to Azure Active Directory using client secret, or a username and password.
Details configured in the following environment variables:
Variable | Description |
---|---|
AZURE_TENANT_ID | The Azure Active Directory tenant(directory) ID. |
AZURE_CLIENT_ID | The client(application) ID of an App Registration in the tenant. |
AZURE_CLIENT_SECRET | A client secret that was generated for the App Registration. |
This credential ultimately uses a ClientSecretCredential
to perform the authentication using
these details.
Please consult the documentation of that class for more details.
Implementations§
source§impl EnvironmentCredential
impl EnvironmentCredential
sourcepub fn new(
http_client: Arc<dyn HttpClient>,
options: TokenCredentialOptions
) -> Self
pub fn new(
http_client: Arc<dyn HttpClient>,
options: TokenCredentialOptions
) -> Self
Creates a new EnvironmentCredential
with the given TokenCredentialOptions
.
Trait Implementations§
source§impl Clone for EnvironmentCredential
impl Clone for EnvironmentCredential
source§fn clone(&self) -> EnvironmentCredential
fn clone(&self) -> EnvironmentCredential
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 more