ex_azure_key_vault v1.0.2 ExAzureKeyVault.ClientAssertionAuth View Source
Internal module for getting authentication token for Azure connection using client assertion.
Link to this section Summary
Functions
Returns bearer token for Azure connection using client assertion.
Creates %ExAzureKeyVault.ClientAssertionAuth{}
struct with account tokens and cert data.
Link to this section Types
Link to this section Functions
Returns bearer token for Azure connection using client assertion.
Examples
iex(1)> ExAzureKeyVault.ClientAssertionAuth.new("6f185f82-9909...", "6f1861e4-9909...", "Dss7v2YI3GgCGfl...", "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEF...")
...(1)> |> ExAzureKeyVault.ClientAssertionAuth.get_bearer_token()
{:ok, "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}
Link to this function
new(client_id, tenant_id, cert_base64_thumbprint, cert_private_key_pem)
View SourceCreates %ExAzureKeyVault.ClientAssertionAuth{}
struct with account tokens and cert data.
Examples
iex(1)> ExAzureKeyVault.ClientAssertionAuth.new("6f185f82-9909...", "6f1861e4-9909...", "Dss7v2YI3GgCGfl...", "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEF...")
%ExAzureKeyVault.ClientAssertionAuth{
client_id: "6f185f82-9909...",
tenant_id: "6f1861e4-9909...",
cert_base64_thumbprint: "Dss7v2YI3GgCGfl...",
cert_private_key_pem: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEF..."
}