ex_azure_key_vault v0.2.3 ExAzureKeyVault.Auth View Source
Internal module for getting authentication token for Azure connection.
Link to this section Summary
Functions
Returns bearer token for Azure connection.
Creates %ExAzureKeyVault.Auth{}
struct with account tokens.
Link to this section Types
Link to this section Functions
Link to this function
get_bearer_token(params)
View Sourceget_bearer_token(ExAzureKeyVault.Auth.t()) :: {:ok, String.t()} | {:error, any()}
Returns bearer token for Azure connection.
Examples
iex(1)> ExAzureKeyVault.Auth.new("6f185f82-9909...", "6f1861e4-9909...", "6f185bb8-9909...")
...(1)> |> ExAzureKeyVault.Auth.get_bearer_token()
{:ok, "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}
Link to this function
new(client_id, client_secret, tenant_id)
View Sourcenew(String.t(), String.t(), String.t()) :: ExAzureKeyVault.Auth.t()
Creates %ExAzureKeyVault.Auth{}
struct with account tokens.
Examples
iex(1)> ExAzureKeyVault.Auth.new("6f185f82-9909...", "6f1861e4-9909...", "6f185bb8-9909...")
%ExAzureKeyVault.Auth{
client_id: "6f185f82-9909...",
client_secret: "6f1861e4-9909...",
tenant_id: "6f185bb8-9909..."
}