Bug fix ZTA (#2533)

This commit is contained in:
Ed Bond 2024-03-27 17:41:35 -05:00 committed by GitHub
parent 26d39772e8
commit 0ff1b8d19c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -705,7 +705,7 @@ defmodule Livebook.Config do
provider ->
with [type, key] <- String.split(provider, ":", parts: 2),
%{^type => module} <- identity_provider_type_to_module() do
{module, key}
{:zta, module, key}
else
_ -> abort!("invalid configuration for identity provider given in #{env}")
end

View file

@ -43,6 +43,11 @@ defmodule Livebook.ConfigTest do
assert Config.identity_provider!("TEST_IDENTITY_PROVIDER") ==
{:custom, LivebookWeb.SessionIdentity, "extra"}
end)
with_env([TEST_IDENTITY_PROVIDER: "cloudflare:123"], fn ->
assert Config.identity_provider!("TEST_IDENTITY_PROVIDER")
{:zta, Livebook.ZTA.Cloudflare, "123"}
end)
end
end