File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,29 @@ async def test_should_validate_v3_tokens_with_check_database_enabled(app: TestCl
203
203
}
204
204
205
205
206
+ async def test_ignore_protected_props_in_create_session (app : TestClient ):
207
+ init (** get_st_init_args ([session .init ()])) # type:ignore
208
+ start_st ()
209
+
210
+ create_session_res = app .post ("/create" , data = {"sub" : "asdf" })
211
+
212
+ assert create_session_res .status_code == 200
213
+
214
+ info = extract_info (create_session_res )
215
+ assert info ["accessTokenFromAny" ] is not None
216
+ assert info ["refreshTokenFromAny" ] is not None
217
+ assert info ["frontToken" ] is not None
218
+
219
+ parsed_token = parse_jwt_without_signature_verification (info ["accessTokenFromAny" ])
220
+ assert parsed_token .payload ["sub" ] != "asdf"
221
+
222
+ s = await create_new_session_without_request_response (
223
+ "public" , "user-id" , {"sub" : "asdf" }
224
+ )
225
+ payload = parse_jwt_without_signature_verification (s .access_token ).payload
226
+ assert payload ["sub" ] != "asdf"
227
+
228
+
206
229
async def test_validation_logic_with_keys_that_can_use_json_nulls_values_in_claims ():
207
230
"""We want to make sure that for access token claims that can be null, the SDK does not fail access token validation if the
208
231
core does not send them as part of the payload. For this we verify that validation passes when the keys are None, empty,
You can’t perform that action at this time.
0 commit comments