keyvault-agent-azure-auth

Crates.iokeyvault-agent-azure-auth
lib.rskeyvault-agent-azure-auth
version0.1.0-alpha
sourcesrc
created_at2020-06-16 08:38:12.755312
updated_at2020-06-16 08:38:12.755312
descriptionunofficial library for Azure authentication in Rust (experimental)
homepage
repositoryhttps://github.com/JeffSimmer/azure-auth-rs
max_upload_size
id254470
size60,854
Jeff Simmer (JeffSimmer)

documentation

README

azure-auth

A library for Azure authentication in Rust.

  • Obtain tokens from a logged-in Azure CLI
  • Obtain tokens for a managed identity - either from an Azure VM or Cloud Shell
  • Obtain tokens directly using username/password or application ID and secret

Example

let authentication_uri = "https://login.windows.net/{tenant}";
let resource_uri = "https://vault.azure.net";

let auth_response = AzureCliAuthenticator::new()
    .authenticate(TokenRequestOptions::from_resource_uri(
        resource_uri,
        authentication_uri,
    ))
    .await;

println!("Auth response: {:?}\n", auth_response);
Commit count: 3

cargo fmt