diff --git a/lib/livebook/config.ex b/lib/livebook/config.ex index f3a278b55..4ca01f289 100644 --- a/lib/livebook/config.ex +++ b/lib/livebook/config.ex @@ -695,7 +695,7 @@ defmodule Livebook.Config do def identity_provider!(env) do case System.get_env(env) do nil -> - {:session, LivebookWeb.SessionIdentity, :unused} + {:session, LivebookWeb.ZTA.SessionIdentity, :unused} "custom:" <> module_key -> destructure [module, key], String.split(module_key, ":", parts: 2) diff --git a/lib/livebook_web/session_identity.ex b/lib/livebook_web/zta/session_identity.ex similarity index 90% rename from lib/livebook_web/session_identity.ex rename to lib/livebook_web/zta/session_identity.ex index 7cbc7e122..143dde000 100644 --- a/lib/livebook_web/session_identity.ex +++ b/lib/livebook_web/zta/session_identity.ex @@ -1,4 +1,4 @@ -defmodule LivebookWeb.SessionIdentity do +defmodule LivebookWeb.ZTA.SessionIdentity do # This module implements the ZTA contract specific to Livebook cookies import Plug.Conn diff --git a/test/livebook/config_test.exs b/test/livebook/config_test.exs index fea5603ab..5287c83b6 100644 --- a/test/livebook/config_test.exs +++ b/test/livebook/config_test.exs @@ -39,9 +39,9 @@ defmodule Livebook.ConfigTest do assert Config.identity_provider!("TEST_IDENTITY_PROVIDER") == {:custom, Module, nil} end) - with_env([TEST_IDENTITY_PROVIDER: "custom:LivebookWeb.SessionIdentity:extra"], fn -> + with_env([TEST_IDENTITY_PROVIDER: "custom:LivebookWeb.ZTA.SessionIdentity:extra"], fn -> assert Config.identity_provider!("TEST_IDENTITY_PROVIDER") == - {:custom, LivebookWeb.SessionIdentity, "extra"} + {:custom, LivebookWeb.ZTA.SessionIdentity, "extra"} end) with_env([TEST_IDENTITY_PROVIDER: "cloudflare:123"], fn ->