@@ -92,7 +92,6 @@ def test_auth_settings_defaults(self) -> None:
9292 """AuthSettings has correct defaults when no env vars are set."""
9393 settings = AuthSettings ()
9494 assert settings .enabled is False
95- assert settings .session_enabled is False
9695 assert not settings .internal_org_id
9796 assert not settings .role_claim
9897 assert not settings .domain
@@ -111,22 +110,16 @@ def test_auth_settings_uses_context_env_prefix(self, monkeypatch: pytest.MonkeyP
111110 settings = AuthSettings ()
112111 assert settings .role_claim == "https://custom/role"
113112
114- def test_enabled_requires_session_enabled (self ) -> None :
115- """enabled=True with session_enabled=False raises ValidationError."""
113+ def test_enabled_requires_session_secret (self ) -> None :
114+ """enabled=True with session_secret=None raises ValidationError."""
116115 with pytest .raises (pydantic .ValidationError ):
117- AuthSettings (enabled = True , session_enabled = False )
118-
119- def test_session_enabled_requires_session_secret (self ) -> None :
120- """session_enabled=True with session_secret=None raises ValidationError."""
121- with pytest .raises (pydantic .ValidationError ):
122- AuthSettings (session_enabled = True , session_secret = None )
116+ AuthSettings (enabled = True , session_secret = None )
123117
124118 def test_enabled_requires_client_secret (self ) -> None :
125119 """enabled=True with client_secret=None raises ValidationError."""
126120 with pytest .raises (pydantic .ValidationError ):
127121 AuthSettings (
128122 enabled = True ,
129- session_enabled = True ,
130123 session_secret = _TEST_SESSION_SECRET ,
131124 client_secret = None ,
132125 )
@@ -136,7 +129,6 @@ def test_enabled_requires_non_empty_domain(self) -> None:
136129 with pytest .raises (pydantic .ValidationError ):
137130 AuthSettings (
138131 enabled = True ,
139- session_enabled = True ,
140132 session_secret = _TEST_SESSION_SECRET ,
141133 client_secret = _TEST_CLIENT_SECRET ,
142134 domain = "" ,
@@ -147,7 +139,6 @@ def test_enabled_requires_non_empty_client_id(self) -> None:
147139 with pytest .raises (pydantic .ValidationError ):
148140 AuthSettings (
149141 enabled = True ,
150- session_enabled = True ,
151142 session_secret = _TEST_SESSION_SECRET ,
152143 client_secret = _TEST_CLIENT_SECRET ,
153144 domain = _TEST_DOMAIN ,
@@ -159,7 +150,6 @@ def test_enabled_requires_non_empty_internal_org_id(self) -> None:
159150 with pytest .raises (pydantic .ValidationError ):
160151 AuthSettings (
161152 enabled = True ,
162- session_enabled = True ,
163153 session_secret = _TEST_SESSION_SECRET ,
164154 client_secret = _TEST_CLIENT_SECRET ,
165155 domain = _TEST_DOMAIN ,
@@ -172,7 +162,6 @@ def test_enabled_requires_non_empty_role_claim(self) -> None:
172162 with pytest .raises (pydantic .ValidationError ):
173163 AuthSettings (
174164 enabled = True ,
175- session_enabled = True ,
176165 session_secret = _TEST_SESSION_SECRET ,
177166 client_secret = _TEST_CLIENT_SECRET ,
178167 domain = _TEST_DOMAIN ,
0 commit comments