summaryrefslogtreecommitdiff
path: root/lib/azure_ex/application.ex
blob: 3b50854efc0e1c2fea05f8cb3fb66179a74bb6c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
defmodule AzureEx.Application do
  @moduledoc false

  use Application

  def start(_tuple, _args) do
    opts = [strategy: :one_for_one, name: AzureEx.Supervisor]

#    Supervisor.start_link([{AzureEx.TokenHosting, get_client_oauth_params()}], opts)
     Supervisor.start_link([], opts)
  end

  defp get_client_oauth_params do
    tenant = Application.get_env(:azure_ex, :tenant)
    client_id = Application.get_env(:azure_ex, :client_id)
    client_secret = Application.get_env(:azure_ex, :client_secret)

    [tenant: tenant, client_id: client_id, client_secret: client_secret]
  end
end