@@ -235,6 +235,11 @@ def test_id_token_payload_0(self):
235235 "nonce" ,
236236 "iat" ,
237237 "exp" ,
238+ "email" ,
239+ "email_verified" ,
240+ "jti" ,
241+ "scope" ,
242+ "client_id" ,
238243 "iss" ,
239244 }
240245
@@ -252,6 +257,11 @@ def test_id_token_payload_with_code(self):
252257 "auth_time" ,
253258 "aud" ,
254259 "exp" ,
260+ "email" ,
261+ "email_verified" ,
262+ "jti" ,
263+ "scope" ,
264+ "client_id" ,
255265 "c_hash" ,
256266 "iss" ,
257267 "iat" ,
@@ -277,6 +287,11 @@ def test_id_token_payload_with_access_token(self):
277287 "auth_time" ,
278288 "aud" ,
279289 "exp" ,
290+ "email" ,
291+ "email_verified" ,
292+ "jti" ,
293+ "scope" ,
294+ "client_id" ,
280295 "iss" ,
281296 "iat" ,
282297 "nonce" ,
@@ -300,6 +315,11 @@ def test_id_token_payload_with_code_and_access_token(self):
300315 "auth_time" ,
301316 "aud" ,
302317 "exp" ,
318+ "email" ,
319+ "email_verified" ,
320+ "jti" ,
321+ "scope" ,
322+ "client_id" ,
303323 "iss" ,
304324 "iat" ,
305325 "nonce" ,
@@ -308,9 +328,10 @@ def test_id_token_payload_with_code_and_access_token(self):
308328 }
309329
310330 def test_id_token_payload_with_userinfo (self ):
311- session_id = self ._create_session (AREQ )
331+ req = dict (AREQ )
332+ req ["claims" ] = {"id_token" : {"given_name" : None }}
333+ session_id = self ._create_session (req )
312334 grant = self .session_manager [session_id ]
313- grant .claims = {"id_token" : {"given_name" : None }}
314335
315336 id_token = self ._mint_id_token (grant , session_id )
316337
@@ -320,6 +341,11 @@ def test_id_token_payload_with_userinfo(self):
320341 "nonce" ,
321342 "iat" ,
322343 "iss" ,
344+ "email" ,
345+ "email_verified" ,
346+ "jti" ,
347+ "scope" ,
348+ "client_id" ,
323349 "given_name" ,
324350 "aud" ,
325351 "exp" ,
@@ -328,9 +354,10 @@ def test_id_token_payload_with_userinfo(self):
328354 }
329355
330356 def test_id_token_payload_many_0 (self ):
331- session_id = self ._create_session (AREQ )
357+ req = dict (AREQ )
358+ req ["claims" ] = {"id_token" : {"given_name" : None }}
359+ session_id = self ._create_session (req )
332360 grant = self .session_manager [session_id ]
333- grant .claims = {"id_token" : {"given_name" : None }}
334361 code = self ._mint_code (grant , session_id )
335362 access_token = self ._mint_access_token (grant , session_id , code )
336363
@@ -344,6 +371,11 @@ def test_id_token_payload_many_0(self):
344371 "nonce" ,
345372 "c_hash" ,
346373 "at_hash" ,
374+ "email" ,
375+ "email_verified" ,
376+ "jti" ,
377+ "scope" ,
378+ "client_id" ,
347379 "sub" ,
348380 "auth_time" ,
349381 "given_name" ,
@@ -391,9 +423,10 @@ def test_get_sign_algorithm(self):
391423 }
392424
393425 def test_available_claims (self ):
394- session_id = self ._create_session (AREQ )
426+ req = dict (AREQ )
427+ req ["claims" ] = {"id_token" : {"nickname" : {"essential" : True }}}
428+ session_id = self ._create_session (req )
395429 grant = self .session_manager [session_id ]
396- grant .claims = {"id_token" : {"nickname" : {"essential" : True }}}
397430
398431 id_token = self ._mint_id_token (grant , session_id )
399432
@@ -497,11 +530,7 @@ def test_client_claims_scopes(self):
497530 grant = self .session_manager [session_id ]
498531
499532 self .session_manager .token_handler ["id_token" ].kwargs ["add_claims_by_scope" ] = True
500-
501- _claims = self .endpoint_context .claims_interface .get_claims (
502- session_id = session_id , scopes = AREQS ["scope" ], claims_release_point = "id_token"
503- )
504- grant .claims = {"id_token" : _claims }
533+ grant .scope = AREQS ["scope" ]
505534
506535 id_token = self ._mint_id_token (grant , session_id )
507536
@@ -519,11 +548,7 @@ def test_client_claims_scopes_and_request_claims_no_match(self):
519548 grant = self .session_manager [session_id ]
520549
521550 self .session_manager .token_handler ["id_token" ].kwargs ["add_claims_by_scope" ] = True
522-
523- _claims = self .endpoint_context .claims_interface .get_claims (
524- session_id = session_id , scopes = AREQRC ["scope" ], claims_release_point = "id_token"
525- )
526- grant .claims = {"id_token" : _claims }
551+ grant .scope = AREQRC ["scope" ]
527552
528553 id_token = self ._mint_id_token (grant , session_id )
529554
@@ -546,11 +571,7 @@ def test_client_claims_scopes_and_request_claims_one_match(self):
546571 grant = self .session_manager [session_id ]
547572
548573 self .session_manager .token_handler ["id_token" ].kwargs ["add_claims_by_scope" ] = True
549-
550- _claims = self .endpoint_context .claims_interface .get_claims (
551- session_id = session_id , scopes = _req ["scope" ], claims_release_point = "id_token"
552- )
553- grant .claims = {"id_token" : _claims }
574+ grant .scope = _req ["scope" ]
554575
555576 id_token = self ._mint_id_token (grant , session_id )
556577
0 commit comments